Our flexible Kanban board for managing tasks with drag drop


Post by vasudha »

Hi,
How to add icon. Please have a look at the attachment and suggest step to add that

view.PNG
view.PNG (1.37 KiB) Viewed 245 times

Here is code

 {
        type: 'button',
        ref: 'viewButton',
        html: <Button buttonVariant="secondary-white">{intl.formatMessage({ id: 'View' })}</Button>,
        menuIcon: null,
        style: 'margin-left:auto',
        menu: {
          items: [
            {
              ref: 'criticalPathsButton',
              text: intl.formatMessage({ id: 'CriticalPath' }),
              checked: false,
              toggleable: true,
              onToggle(props: any) {
                const {
                  menu: {
                    owner: {
                      parent: { parent: gantt },
                    },
                  },
                } = props;
                gantt.features.criticalPaths.disabled = !props.checked;
                const data = {
                  enableCriticalPath: props.checked,
                };
                StateHelper.saveEnableCriticalPath(data);
              },
            },
          ],
        },
      },
      Thanks!!

Post by joakim.l »

Hi!

Since you're replacing the Bryntum button's markup with a REACT component the icon configuration belongs to the REACT component.

If you would use the default markup instead (remove the html config), the button would get a menu icon automatically, as you have configured a menu.

Regards
Joakim


Post Reply