Our pure JavaScript Scheduler component


Post by burnit »

Hello,

we have two BryntumCombos in use.
When I select bottles from the first BryntumCombo, I set a filter for any resource that is not in that location.
But for the second BryntumCombo it shows all resources (resourceStore.data).
But now I want all of them that are shown to be selected.
But this is not possible, because the data is not updated.
Does anyone have an idea?

 <BryntumCombo
        editable={false}
        items={[
          ['tubes', 'Halle Tuben'],
          ['bottles', 'Halle Dosen / Flaschen'],
          ['1c', 'Halle 1-K'],
          ['2c', 'Halle 2-K'],
        ]}
        onChange={(ev) => {
          scheduler.resourceStore.data.map((x) => {
            if (x.location != ev.value) {
              scheduler.resourceStore.filter({
                id: `filter_${x.name}`,
                filterBy: (r) => r.name !== x.name,
              });
            }
          });
        }}
        value={defaultFilter}
      ></BryntumCombo>
      <BryntumButton
        text={'Maschinen auswählen'}
        menu={{
        items: scheduler.resourceStore.data.map((x) => ({
            text: x.name,
            checked: false,
          })),
          onToggle(ev) {
            if (!ev.checked) {
              schedulerPro.current.instance.resourceStore.filter({
                id: `filter_${ev.item.initialConfig.text}`,
                filterBy: (r) => r.name !== ev.item.initialConfig.text,
              });
            } else {
              schedulerPro.current.instance.resourceStore.removeFilter(
                `filter_${ev.item.initialConfig.text}`
              );
            }
          },
        }}
      ></BryntumButton>

Post by alex.l »

Hi burnit,

Sorry, I don't understand the case. I also don't see second combo in the code provided. Could you please describe it in more words and share more code, with actual and expected result.

All the best,
Alex


Post Reply