mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #5141 - Add highlightOnSelect and showTick props to Dropdown
This commit is contained in:
parent
a4ad0bba81
commit
df5142074d
4 changed files with 53 additions and 9 deletions
|
@ -61,6 +61,8 @@ const css = `
|
|||
white-space: nowrap;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.p-dropdown-item-group {
|
||||
|
@ -134,14 +136,16 @@ const classes = {
|
|||
wrapper: 'p-dropdown-items-wrapper',
|
||||
list: 'p-dropdown-items',
|
||||
itemGroup: 'p-dropdown-item-group',
|
||||
item: ({ instance, state, option, focusedOption }) => [
|
||||
item: ({ instance, props, state, option, focusedOption }) => [
|
||||
'p-dropdown-item',
|
||||
{
|
||||
'p-highlight': instance.isSelected(option),
|
||||
'p-highlight': instance.isSelected(option) && props.highlightOnSelect,
|
||||
'p-focus': state.focusedOptionIndex === focusedOption,
|
||||
'p-disabled': instance.isOptionDisabled(option)
|
||||
}
|
||||
],
|
||||
tickIcon: 'p-dropdown-tick-icon',
|
||||
blankIcon: 'p-dropdown-blank-icon',
|
||||
emptyMessage: 'p-dropdown-empty-message'
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue