I have a field name "link" that is going to be set to 1 or 0 (I could change it to a text field and the content could be true or false). I want either a widget/button or an actioncolumn that ONLY displays if the field value for that record is = 1 or is true. So, a clickable button that only appears if the record field value is true or = 1. How could I use an actioncolumn or widget to achieve this? I'm very new to this so I have no idea of the syntax. Thanks!
{
text : 'Widget',
field : 'done', // boolean data field
width : 100,
type : 'widget',
widgets : [{
defaultBindProperty : 'hidden', // so "done" field is set to the "hidden" property of the widget
type : 'button',
tooltip : 'Add',
icon : 'b-fa b-fa-plus',
cls : 'b-blue b-raised',
onAction : ({ source : btn }) => {
...
}
}]
},