Our state of the art Gantt chart


Post by bharat95 »

Hi there,

I have a filter button in tbar. So when I clicked on that button a container with 'ADD Filter' button is opened. Actually I want to increase the size of the container. See attachment

filter.PNG
filter.PNG (13.74 KiB) Viewed 187 times

The box surrounded by red should be increased. Can we do that by accessing any properties and modifying them in bryntum? If so, please suggest.

Thanks,
Bharat.


Post by tasnim »

Hi,

Could you please show the code how you implemented that?


Post by bharat95 »

Hi tasnim,

This is the code

 menu: {
            pickergroup: {
              grid: gantt.current.instance,
              type: 'gridfieldfilterpickergroup',
              fields: [
                { name: 'owner', type: 'string' },
                { name: 'function', type: 'string' },
                { name: 'status', type: 'string' },
              ],
            },
          },

Thanks,
Bharat.


Post by alex.l »

Hi Bharat,

Not sure how to test the code you provided. Did you try to set width for components?

All the best,
Alex


Post by bharat95 »

Hi alex.

This is my entire code.

 gantt.current.instance.tbar.add([
        {
          type: 'button',
          ref: 'filterAllButton',
          icon: 'b-gantt-filter',
          tooltip: 'Filter',
          menu: {
            pickergroup: {
              grid: gantt.current.instance,
              type: 'gridfieldfilterpickergroup',
              fields: [
                { name: 'owner', type: 'string' },
                { name: 'function', type: 'string' },
                { name: 'status', type: 'string' },
              ],
            },
          },
        },
      ]);

I'm adding filter button in tbar and when I click on that button, a container is opening which I attached above. So that container size to be increased to make a user friendly UI. In order set the width, I'm unable to capture the class of that container. Could you please try this code from your end?

Thanks,
Bharat.


Post by tasnim »

You could set the width prop in pickerGroup
https://bryntum.com/products/gantt/docs/api/Grid/widget/GridFieldFilterPickerGroup#config-width

{
          type: 'button',
          ref: 'filterAllButton',
          icon: 'b-gantt-filter',
          tooltip: 'Filter',
          menu: {
            pickergroup: {
              width : 500,
              grid: gantt,
              type: 'gridfieldfilterpickergroup',
              fields: [
                { name: 'owner', type: 'string' },
                { name: 'function', type: 'string' },
                { name: 'status', type: 'string' },
              ],
            },
          },
        }

Post by bharat95 »

Hi tasnim,

It helped.

Thanks,
Bharat.


Post Reply