Hello I was trying to change a type:button into type:slidetoggle but not getting the same functionality as the slidetoggle only works once, with the first click.
Can you suggest something?
The original code:
onToggle: ({pressed}) => {
addButton.disabled = saveButton.disabled = removeButton.disabled = grid.current.readOnly = pressed;
if(!pressed){ Toast.show({html: "you can edit",
showProgress: false,
})
}
if(pressed){
Toast.hideAll()
}
},
and changed code:
onAction: ({checked}) => {
addButton.disabled = saveButton.disabled = removeButton.disabled = grid.current.readOnly = checked;
if(!checked){ Toast.show({html: "you can edit",
showProgress: false,
})
}
if(checked){
Toast.hideAll()
}
},
is in pictures attached.
Thanks