(node: FormKitNode)
| 74 | * @public |
| 75 | */ |
| 76 | export default function checkboxes(node: FormKitNode): void { |
| 77 | node.on('created', () => { |
| 78 | if (node.context?.handlers) { |
| 79 | node.context.handlers.toggleChecked = toggleChecked.bind(null, node) |
| 80 | } |
| 81 | if (node.context?.fns) { |
| 82 | node.context.fns.isChecked = isChecked.bind(null, node) |
| 83 | } |
| 84 | // Configure our default onValue and offValue |
| 85 | if (!has(node.props, 'onValue')) node.props.onValue = true |
| 86 | if (!has(node.props, 'offValue')) node.props.offValue = false |
| 87 | }) |
| 88 | |
| 89 | node.hook.prop(normalizeBoxes(node)) |
| 90 | } |
nothing calls this directly
no test coverage detected