FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(Select): set onFilter to null to run the default filter by boaz0 · Pull Request #3158 · patternfly/patternfly-react · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .snap  (1) .tsx  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
    • Select.tsx
      • Select.test.tsx.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class Select extends React.Component<SelectProps & InjectedOuiaProps, SelectStat
isPlain: false,
isDisabled: false,
isCreatable: false,
"aria-label": '',
'aria-label': '',
ariaLabelledBy: '',
ariaLabelTypeAhead: '',
ariaLabelClear: 'Clear all',
Expand All @@ -119,7 +119,7 @@ class Select extends React.Component<SelectProps & InjectedOuiaProps, SelectStat
onClear: (_e: React.MouseEvent) => undefined as void,
onCreateOption: (_newOptionValue: string) => undefined as void,
toggleIcon: null as React.ReactElement,
onFilter: (_e: React.ChangeEvent<HTMLInputElement>) => undefined as void
onFilter: null
} as Partial<SelectProps & InjectedOuiaProps>;

state = {
Expand Down Expand Up @@ -384,10 +384,10 @@ class Select extends React.Component<SelectProps & InjectedOuiaProps, SelectStat
)}
ref={this.parentRef}
style={{ width }}
{...ouiaContext.isOuia && {
{...(ouiaContext.isOuia && {
'data-ouia-component-type': 'Select',
'data-ouia-component-id': ouiaId || ouiaContext.ouiaId
}}
})}
>
<SelectContext.Provider value={{ onSelect, onClose: this.onClose, variant }}>
<SelectToggle
Expand Down Expand Up @@ -442,6 +442,7 @@ class Select extends React.Component<SelectProps & InjectedOuiaProps, SelectStat
: this.getDisplay(selections as string, 'text') || ''
}
type="text"
onClick={this.onClick}
onChange={this.onChange}
onFocus={this.handleFocus}
autoComplete="off"
Expand Down Expand Up @@ -480,6 +481,7 @@ class Select extends React.Component<SelectProps & InjectedOuiaProps, SelectStat
value={typeaheadInputValue !== null ? typeaheadInputValue : ''}
type="text"
onChange={this.onChange}
onClick={this.onClick}
onFocus={this.handleFocus}
autoComplete="off"
disabled={isDisabled}
Expand Down
Loading

Back | FazBrowse Home | New Git URL