diff --git a/packages/react-core/src/deprecated/components/Select/Select.tsx b/packages/react-core/src/deprecated/components/Select/Select.tsx index 165dcf0b719..0a33b93ffb5 100644 --- a/packages/react-core/src/deprecated/components/Select/Select.tsx +++ b/packages/react-core/src/deprecated/components/Select/Select.tsx @@ -37,6 +37,7 @@ import { Popper } from '../../../helpers/Popper/Popper'; import { createRenderableFavorites, extendItemsWithFavorite } from '../../../helpers/favorites'; import { ValidatedOptions } from '../../../helpers/constants'; import { findTabbableElements } from '../../../helpers/util'; +import { TextInput } from '../../../components/TextInput'; // seed for the aria-labelledby ID let currentId = 0; @@ -1381,8 +1382,8 @@ export class Select extends React.Component
{toggleIcon && {toggleIcon}} -
- this.onChange(event as React.ChangeEvent)} onClick={this.onClick} - onChange={this.onChange} autoComplete={inputAutoComplete} - disabled={isDisabled} + isDisabled={isDisabled} ref={this.inputRef} - /> -
+ />
{hasOnClear && (selections[0] || typeaheadInputValue) && clearBtn} @@ -1410,8 +1409,8 @@ export class Select extends React.Component {toggleIcon && {toggleIcon}} {selections && Array.isArray(selections) && selections.length > 0 && selectedChips} -
- this.onChange(event as React.ChangeEvent)} onClick={this.onClick} autoComplete={inputAutoComplete} - disabled={isDisabled} + isDisabled={isDisabled} ref={this.inputRef} - /> -
+ /> {hasOnClear && ((selections && selections.length > 0) || typeaheadInputValue) && clearBtn} diff --git a/packages/react-core/src/deprecated/components/Select/__tests__/__snapshots__/Select.test.tsx.snap b/packages/react-core/src/deprecated/components/Select/__tests__/__snapshots__/Select.test.tsx.snap index 5585f855755..481bd3a87d5 100644 --- a/packages/react-core/src/deprecated/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +++ b/packages/react-core/src/deprecated/components/Select/__tests__/__snapshots__/Select.test.tsx.snap @@ -1673,6 +1673,9 @@ exports[`typeahead multi select renders closed successfully 1`] = ` aria-invalid="false" aria-label="" autocomplete="off" + data-ouia-component-id="OUIA-Generated-TextInputBase-6" + data-ouia-component-type="PF5/TextInput" + data-ouia-safe="true" id="typeahead-multi-select-closed-select-multi-typeahead-typeahead" placeholder="" type="text" @@ -1730,6 +1733,9 @@ exports[`typeahead multi select renders expanded successfully 1`] = ` aria-invalid="false" aria-label="" autocomplete="off" + data-ouia-component-id="OUIA-Generated-TextInputBase-7" + data-ouia-component-type="PF5/TextInput" + data-ouia-safe="true" id="pf-select-toggle-id-19-select-multi-typeahead-typeahead" placeholder="" type="text" @@ -1963,6 +1969,9 @@ exports[`typeahead multi select renders selected successfully 1`] = ` aria-invalid="false" aria-label="" autocomplete="off" + data-ouia-component-id="OUIA-Generated-TextInputBase-8" + data-ouia-component-type="PF5/TextInput" + data-ouia-safe="true" id="typeahead-multi-select-selected-select-multi-typeahead-typeahead" placeholder="" type="text" @@ -2111,8 +2120,12 @@ exports[`typeahead select renders closed successfully 1`] = ` class="pf-v5-c-form-control pf-v5-c-select__toggle-typeahead" >