Hi ,
I am using bryntum button widget in column . Consider i am having buttons button and button
when i click button one i need to hide button or when i click button 2 i need to hide button 1 .Kindly tell how to achieve this in OnAction method in button of bryntum .
How to call Vue js function form from Bryntum config.js file .
Yes, that's what I suggest. On your button click handler, set a flag on your record data and then use the renderer to hide/show the other button.
new Grid({
columns : [
{
type: 'check',
field: 'allow',
// In the column renderer, we get access to the record and column widgets
renderer({ record, widgets }) {
// Hide button in certain rows
widgets[0].hidden = record.yourFlag;
widgets[1].hidden = !record.yourFlag;
}
}
]
});
The key is to define a clickHandler function in Vue and then pass it down to the rendering components in extraData through grid which binds property extraData. It is then used in the renderer to pass the clickHandler as a prop of the Vue rendering component.