Skip to content

Commit

Permalink
Autocomplete fix incorrect prop (#4742)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Aug 4, 2023
1 parent e695965 commit d75d4c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/lib/autocomplete/AutoCompleteBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const classes = {
listWrapper: 'p-autocomplete-items-wrapper',
list: ({ virtualScrollerOptions, options }) => (virtualScrollerOptions ? classNames('p-autocomplete-items', options.className) : 'p-autocomplete-items'),
emptyMessage: 'p-autocomplete-item',
item: ({ suggestion, optionGroupLabel }) => (optionGroupLabel ? classNames('p-autocomplete-item', { 'p-disabled': item.disabled }) : classNames('p-autocomplete-item', { 'p-disabled': suggestion.disabled })),
item: ({ suggestion, optionGroupLabel }) => (optionGroupLabel ? classNames('p-autocomplete-item', { 'p-disabled': suggestion.disabled }) : classNames('p-autocomplete-item', { 'p-disabled': suggestion.disabled })),
itemGroup: 'p-autocomplete-item-group',
footer: 'p-autocomplete-footer'
};
Expand Down
5 changes: 2 additions & 3 deletions components/lib/autocomplete/AutoCompletePanel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import { localeOption } from '../api/Api';
import { PrimeReactContext } from '../api/Api';
import { localeOption, PrimeReactContext } from '../api/Api';
import { CSSTransition } from '../csstransition/CSSTransition';
import { Portal } from '../portal/Portal';
import { Ripple } from '../ripple/Ripple';
Expand Down Expand Up @@ -51,7 +50,7 @@ export const AutoCompletePanel = React.memo(
{
role: 'option',
'aria-selected': selected,
className: cx('item', { optionGroupLabel: props.optionGroupLabel, item }),
className: cx('item', { optionGroupLabel: props.optionGroupLabel, suggestion: item }),
style,
onClick: (e) => props.onItemClick(e, item),
'data-group': i,
Expand Down

0 comments on commit d75d4c2

Please sign in to comment.