Thanks for the help on the tab change. This helped me to solve the problem i actually had. I ended up using another event called "onTabClick" to execute specific actions when the tab is actually clicked.
I might have another question regarding this functionality... because when i switch from event to event the clicks start to build up. So everytime you click on different event it executes the functions depending on the number of clicks. Does anyone know why this even happens? I solved this by using "once: true" in de click handler and using the following piece of code to clear the exisiting event listeners:
The click handlers built up because you add the click listener on every "before task edit" event. You only need to add the listener to b-tab-1 (Bad idea to use ids) once.
Not have it execute once. Only add it once.
But what is the purpose of this listener? You want to always hide the save button?
The click handlers built up because you add the click listener on every "before task edit" event. You only need to add the listener to b-tab-1 (Bad idea to use ids) once.
Not have it execute once. Only add it once.
But what is the purpose of this listener? You want to always hide the save button?
Hey Animal,.
Thanks for your response. Sure, i can add a reference for the button, that's no problem.. this was more a POC. So yeah i agree that it's much cleaner when you don't use id's.
The purpose of the listener is to hide the save button and execute an ajax call. The save button does not have to be hidden for tabs 2 and tabs 3.
So the save button needs to hide and show depending on which tab the user switches to?
taskEdit : {
// Add a tab change listener
editorConfig : {
listeners : {
show ({ source : editor }) {
editor.widgetMap.tabs.on({
tabChange({ prevActiveItem, activeItem}) {
// handle it
}
})
},
once : true
}
}
Yes that's correct! Thanks for the info. My questions i fully resolved. I just want to add that it would be nice if you can have a click or change handler on the tab item in the taskedit. For example: