Premium support for our pure JavaScript UI components
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?
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 (1.55 MiB) Viewed 228 times
Hi,
Yes, it should. And it's doing it too. Please check the attached .gif below
Attachments
chrome_cxxfwAaP8g.gif (1.14 MiB) Viewed 225 times
shaveta wrote: ↑ Wed Jun 07, 2023 7:39 am
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 (709.82 KiB) Viewed 219 times
Could you please try to disable it from code and see results?
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?
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
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?
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.
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 (348.49 KiB) Viewed 156 times