Page 1 of 1

[REACT] taskMenu show/hide item programmatically

Posted: Mon Jan 17, 2022 6:31 pm
by greg

Hi,
I have a custom taskMenu items, something like that:

features: {
      taskMenu: {
        items: {
          editTask: {
            onItem() {...}
          }
....

I would like to show/hide it or (disable/enable if hiding not possible).

I tried to call:

taskboardRef.current.instance.features.taskMenu.items.editTask.disabled =
      !editable;

with and without:

taskboardRef.current.instance.recompose();

I also try hidden instead of disabled, but with no luck.

Could you advise if/how I can do it, please?
Thanks


Re: [REACT] taskMenu show/hide item programmatically

Posted: Mon Jan 17, 2022 9:39 pm
by Animal