NcActionCheckbox
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
id | id attribute of the checkbox element | string | - | () => 'action-' + GenRandomId() |
checked | checked state of the the checkbox element | boolean | - | false |
value | value of the checkbox input | string|number | - | '' |
disabled | disabled state of the checkbox element | boolean | - | false |
Events
Event name | Properties | Description |
---|---|---|
change | Emitted when the checkbox state is changed | |
check | Emitted when the checkbox is checked | |
uncheck | Emitted when the checkbox is unchecked | |
update:checked | Emitted when the checkbox state is changed |
Slots
Name | Description | Bindings |
---|---|---|
default |
This component is made to be used inside of the NcActions component slots.
vue
<NcActions>
<NcActionCheckbox @change="alert('(un)checked !')">First choice</NcActionCheckbox>
<NcActionCheckbox value="second" @change="alert('(un)checked !')">Second choice</NcActionCheckbox>
<NcActionCheckbox :checked="true" @change="alert('(un)checked !')">Third choice (checked)</NcActionCheckbox>
<NcActionCheckbox :disabled="true" @change="alert('(un)checked !')">Second choice (disabled)</NcActionCheckbox>
</NcActions>