Page 1 of 1

[INFO REQ] Dynamically update resources' group

Posted: Fri Jan 22, 2021 2:16 pm
by bizzcoo

Hello,

I have a group feature like this

features: {
      group: {
        field: 'group.id',
        renderer: ({ record, isFirstColumn }) => {
          const groupName = record.groupChildren[0]?.group.name;
          return isFirstColumn ? `${groupName} (${record.groupChildren.length - 1})` : '';
        }
      }
    }

So the records are grouped based on the field group (e.g. {name: "Test", id: "test"}).

Now I want to be able to update a resource's group so that it's placed under another group (e.g. {name: Foo, id: "foo"}. How do I best update the resource's group?

Thanks


Re: [INFO REQ] Dynamically update resources' group

Posted: Fri Jan 22, 2021 3:36 pm
by pmiklashevich

You can change grouping dynamically by calling group on the store. https://www.bryntum.com/docs/scheduler/#Core/data/mixin/StoreGroup


Re: [INFO REQ] Dynamically update resources' group

Posted: Thu Jan 28, 2021 4:58 pm
by bizzcoo

Thank you! I realized I updated the resources wrong so now the groups are updated as I want.