Fixed #5105 - Highlight state changes on Checkbox selection mode
parent
7b7eb3df1d
commit
19f9813d16
|
@ -250,6 +250,10 @@ export default {
|
|||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
highlightOnSelect: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: null
|
||||
|
|
|
@ -360,7 +360,7 @@ const classes = {
|
|||
|
||||
if (props.selection) {
|
||||
rowStyleClass.push({
|
||||
'p-highlight': instance.isSelected
|
||||
'p-highlight': instance.isSelected && instance.$parentInstance.$parentInstance.highlightOnSelect
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -131,6 +131,10 @@ export default {
|
|||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
highlightOnSelect: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
filterMessage: {
|
||||
type: String,
|
||||
default: null
|
||||
|
|
|
@ -156,10 +156,10 @@ const classes = {
|
|||
wrapper: 'p-multiselect-items-wrapper',
|
||||
list: 'p-multiselect-items p-component',
|
||||
itemGroup: 'p-multiselect-item-group',
|
||||
item: ({ instance, option, index, getItemOptions }) => [
|
||||
item: ({ instance, option, index, getItemOptions, props }) => [
|
||||
'p-multiselect-item',
|
||||
{
|
||||
'p-highlight': instance.isSelected(option),
|
||||
'p-highlight': instance.isSelected(option) && props.highlightOnSelect,
|
||||
'p-focus': instance.focusedOptionIndex === instance.getOptionIndex(index, getItemOptions),
|
||||
'p-disabled': instance.isOptionDisabled(option)
|
||||
}
|
||||
|
|
|
@ -58,6 +58,10 @@ export default {
|
|||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
highlightOnSelect: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
scrollHeight: {
|
||||
type: String,
|
||||
default: null
|
||||
|
|
|
@ -108,7 +108,7 @@ const classes = {
|
|||
instance.node.styleClass,
|
||||
{
|
||||
'p-treenode-selectable': instance.selectable,
|
||||
'p-highlight': instance.checkboxMode ? instance.checked : instance.selected
|
||||
'p-highlight': instance.checkboxMode && instance.$parentInstance.highlightOnSelect ? instance.checked : instance.selected
|
||||
}
|
||||
],
|
||||
toggler: 'p-tree-toggler p-link',
|
||||
|
|
Loading…
Reference in New Issue