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

fix(Select): Display pre-selected input by Venefilyn · Pull Request #3305 · 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 @@ -83,7 +83,7 @@ export interface SelectProps

export interface SelectState {
openedOnEnter: boolean;
typeaheadInputValue: string;
typeaheadInputValue: string|null;
typeaheadActiveChild?: HTMLElement;
typeaheadFilteredChildren: React.ReactNode[];
typeaheadCurrIndex: number;
Expand Down Expand Up @@ -122,9 +122,9 @@ class Select extends React.Component<SelectProps & InjectedOuiaProps, SelectStat
onFilter: null
} as Partial<SelectProps & InjectedOuiaProps>;

state = {
state: SelectState = {
openedOnEnter: false,
typeaheadInputValue: '',
typeaheadInputValue: null,
typeaheadActiveChild: null as HTMLElement,
typeaheadFilteredChildren: React.Children.toArray(this.props.children),
typeaheadCurrIndex: -1,
Expand Down Expand Up @@ -215,7 +215,7 @@ class Select extends React.Component<SelectProps & InjectedOuiaProps, SelectStat
clearSelection = (e: React.MouseEvent) => {
e.stopPropagation();
this.setState({
typeaheadInputValue: '',
typeaheadInputValue: null,
typeaheadActiveChild: null,
typeaheadFilteredChildren: React.Children.toArray(this.props.children),
typeaheadCurrIndex: -1
Expand Down
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 @@ -8997,7 +8997,7 @@ exports[`typeahead select renders selected successfully 1`] = `
id="select-typeahead"
placeholder=""
type="text"
value=""
value="Mr"
/>
</div>
<button
Expand Down Expand Up @@ -9140,7 +9140,7 @@ exports[`typeahead select renders selected successfully 1`] = `
onFocus={[Function]}
placeholder=""
type="text"
value=""
value="Mr"
/>
</div>
<button
Expand Down

Back | FazBrowse Home | New Git URL