diff --git a/components/lib/checkbox/BaseCheckbox.vue b/components/lib/checkbox/BaseCheckbox.vue index c113f27a6..82e049bbf 100644 --- a/components/lib/checkbox/BaseCheckbox.vue +++ b/components/lib/checkbox/BaseCheckbox.vue @@ -13,6 +13,10 @@ export default { type: String, default: null }, + indeterminate: { + type: Boolean, + default: false + }, trueValue: { type: null, default: true diff --git a/components/lib/checkbox/Checkbox.d.ts b/components/lib/checkbox/Checkbox.d.ts index 50217b5e3..7167a6ee7 100755 --- a/components/lib/checkbox/Checkbox.d.ts +++ b/components/lib/checkbox/Checkbox.d.ts @@ -111,6 +111,11 @@ export interface CheckboxProps { * @default false */ binary?: boolean; + /** + * When present, it specifies input state as indeterminate. + * @default false + */ + indeterminate?: boolean | undefined; /** * When present, it specifies that the component should have invalid state style. * @defaultValue false diff --git a/components/lib/checkbox/Checkbox.vue b/components/lib/checkbox/Checkbox.vue index d2ae54475..b68a9c8cb 100755 --- a/components/lib/checkbox/Checkbox.vue +++ b/components/lib/checkbox/Checkbox.vue @@ -1,5 +1,5 @@ - + diff --git a/components/lib/treetable/BodyCell.vue b/components/lib/treetable/BodyCell.vue index 86d557b5b..131dc5083 100644 --- a/components/lib/treetable/BodyCell.vue +++ b/components/lib/treetable/BodyCell.vue @@ -18,15 +18,13 @@ :class="cx('rowCheckbox')" @change="toggleCheckbox" :tabindex="-1" + :indeterminate="partialChecked" :unstyled="unstyled" :pt="getColumnCheckboxPT('rowCheckbox')" - :data-p-highlight="checked" - :data-p-checked="checked" :data-p-partialchecked="partialChecked" >