Fixed indeterminate checkboxes visual issue with minus icon

pull/310/head
cagataycivici 2020-05-02 12:51:45 +03:00
parent 3ec1a7446a
commit ec709813b0
3 changed files with 4 additions and 3 deletions

View File

@ -16,6 +16,7 @@
transition-property: transform; transition-property: transform;
} }
.p-checkbox-box.p-highlight .p-checkbox-icon { .p-checkbox-box.p-highlight .p-checkbox-icon ,
.p-checkbox-box.p-indeterminate .p-checkbox-icon {
transform: scale(1); transform: scale(1);
} }

View File

@ -294,7 +294,7 @@ export default {
}]; }];
}, },
checkboxClass() { checkboxClass() {
return ['p-checkbox-box', {'p-highlight': this.checked}]; return ['p-checkbox-box', {'p-highlight': this.checked, 'p-indeterminate': this.partialChecked}];
}, },
checkboxIcon() { checkboxIcon() {
return ['p-checkbox-icon', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}]; return ['p-checkbox-icon', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}];

View File

@ -233,7 +233,7 @@ export default {
return this.selectionMode === 'checkbox'; return this.selectionMode === 'checkbox';
}, },
checkboxClass() { checkboxClass() {
return ['p-checkbox-box', {'p-highlight': this.checked, 'p-focus': this.checkboxFocused}]; return ['p-checkbox-box', {'p-highlight': this.checked, 'p-focus': this.checkboxFocused, 'p-indeterminate': this.partialChecked}];
}, },
checkboxIcon() { checkboxIcon() {
return ['p-checkbox-icon', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}]; return ['p-checkbox-icon', {'pi pi-check': this.checked, 'pi pi-minus': this.partialChecked}];