Premium support for our pure JavaScript UI components


Post by shaveta »

Hi,

In an advanced Gantt example, I am trying to disable the feature using the below code in the console and it is not working

gantt.features.cellEdit.disabled= true

But disabling the feature in the code as shown below works

{
     text: 'Enable cell editing',
     feature: 'cellEdit',
     checked: true,
     disabled: true,
}

Is there another way to enable/disable the feature from the code?


Post by tasnim »

Hi,

What version are you using?

I'm not able to reproduce it here https://bryntum.com/products/gantt/examples/basic/

Could you please provide the steps to reproduce it?


Post by shaveta »

tasnim wrote: Tue Jun 06, 2023 5:55 pm

Hi,

What version are you using?

I'm not able to reproduce it here https://bryntum.com/products/gantt/examples/basic/

Could you please provide the steps to reproduce it?

I have disabled the cellEdit feature, isn't it should be disabled in the features menu too?

Screenshot 2023-06-07 at 11.08.33 AM.png
Screenshot 2023-06-07 at 11.08.33 AM.png (1.55 MiB) Viewed 218 times

Post by tasnim »

Hi,

Yes, it should. And it's doing it too. Please check the attached .gif below

Attachments
chrome_cxxfwAaP8g.gif
chrome_cxxfwAaP8g.gif (1.14 MiB) Viewed 215 times

Post by shaveta »

shaveta wrote: Wed Jun 07, 2023 7:39 am
tasnim wrote: Tue Jun 06, 2023 5:55 pm

Hi,

What version are you using?

I'm not able to reproduce it here https://bryntum.com/products/gantt/examples/basic/

Could you please provide the steps to reproduce it?

I have disabled the cellEdit feature, isn't it should be disabled in the features menu too?
Screenshot 2023-06-07 at 11.08.33 AM.png

Thanks Tasnim!

Isn't disabled mean the options shouldn't be clickable from the features menu? can one still check/uncheck after disabling? If you disable it from the code then you can't check/uncheck and the cellEdit feature is greyed out in the menu as shown in the screenshot.

{
      text: 'Enable cell editing',
      feature: 'cellEdit',
      checked: false,
      disabled: true,
},
Screenshot 2023-06-07 at 11.18.08 AM.png
Screenshot 2023-06-07 at 11.18.08 AM.png (709.82 KiB) Viewed 209 times

Could you please try to disable it from code and see results?


Post by tasnim »

Hi,

Disabling features that feature doesn't disable the checkbox. The checkbox is also used to toggle that feature.

What are your expectations on disabling features?


Post by shaveta »

tasnim wrote: Wed Jun 07, 2023 9:45 am

Hi,

Disabling features that feature doesn't disable the checkbox. The checkbox is also used to toggle that feature.

What are your expectations on disabling features?

I got your point, I was expecting the checkbox to be disabled along with feature disable


Post by Animal »

The application was not written (and no applications CAN be written) to protect itself c ompletely from people poking things using the debugger.

You could use scheduler.store = null, and yes, that might..... do things.

What application issue are you implementing for your project which uses Gantt?


Post by shaveta »

Animal wrote: Thu Jun 08, 2023 8:09 am

The application was not written (and no applications CAN be written) to protect itself c ompletely from people poking things using the debugger.

You could use scheduler.store = null, and yes, that might..... do things.

What application issue are you implementing for your project which uses Gantt?

Never mind. I was assuming the feature disable will disable the checkbox too. From Tasnim's reply above, It got clarified.


Post by tasnim »

If you want to disable the checkbox when the feature is disabled
https://bryntum.com/products/gantt/docs/api/Gantt/feature/CellEdit#event-disable
You could try this

        cellEdit : {
            listeners : {
                disable(event) {
                    const { source : { owner } } = event;
                    owner.widgetMap.tbar.widgetMap.featuresButton.menu.widgetMap['b-menuitem-7'].disabled = true;
                }
            }
        }
Attachments
chrome_s9uuxL7QXx.gif
chrome_s9uuxL7QXx.gif (348.49 KiB) Viewed 146 times

Post Reply