I am using ng2-smart-table in my project, I want to add a column with checkboxes which while rendering will be checked based on the object which binds the table. In the object, there is a field with a boolean value which will determine if the checkbox will be checked or not, and after making changes in the checkboxes, the changed values should be available.
You need to set filter type checkbox
passed: {
title: 'Passed',
filter: {
type: 'checkbox',
config: {
true: 'Yes',
false: 'No',
resetText: 'clear',
},
},
},
in your data you need to pass checkbox value
data = [
{
id: 4,
name: 'Patricia Lebsack',
email: '[email protected]',
passed: 'Yes',
},
]
Try this example Checkbox, Select and Completer filter types
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With