Skip to content

Commit ce98e76

Browse files
committed
refactor(CFormCheck): update indeterminate state
1 parent c6034d8 commit ce98e76

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

packages/coreui-vue/src/components/form/CFormCheck.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ const CFormCheck = defineComponent({
5757
default: undefined,
5858
required: false,
5959
},
60+
/**
61+
* Input Checkbox indeterminate Property
62+
*/
63+
indeterminate: Boolean,
6064
/**
6165
* Group checkboxes or radios on the same horizontal row by adding.
6266
*/
@@ -149,6 +153,7 @@ const CFormCheck = defineComponent({
149153
},
150154
],
151155
id: props.id,
156+
indeterminate: props.indeterminate,
152157
onChange: (event: InputEvent) => handleChange(event),
153158
type: props.type,
154159
})

packages/docs/forms/checks-radios.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Browser default checkboxes and radios are replaced with the help of `<CFormCheck
2222

2323
## Indeterminate
2424

25-
Checkboxes can utilize the `:indeterminate` pseudo class when manually set via JavaScript (there is no available HTML attribute for specifying it).
25+
Checkboxes can utilize the `:indeterminate` pseudo-class when manually set via `indeterminate` property.
2626

2727
::: demo
28-
<CFormCheck id="flexCheckIndeterminate" label="Indeterminate checkbox" ref={checkboxRef} />
28+
<CFormCheck id="flexCheckIndeterminate" label="Indeterminate checkbox" indeterminate />
2929

3030
:::
3131
```vue
32-
<CFormCheck id="flexCheckIndeterminate" label="Indeterminate checkbox" ref={checkboxRef} />
32+
<CFormCheck id="flexCheckIndeterminate" label="Indeterminate checkbox" indeterminate />
3333
```
3434

3535
### Disabled

0 commit comments

Comments
 (0)