Skip to content

Commit

Permalink
only autofocus widget search (appsmithorg#2400)
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhsaxena authored Dec 30, 2020
1 parent 31d8c8c commit c344377
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/client/src/pages/Editor/Explorer/ExplorerSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const Underline = styled.div`
/*eslint-disable react/display-name */
export const ExplorerSearch = forwardRef(
(
props: { clear: () => void; placeholder?: string },
props: { clear: () => void; placeholder?: string; autoFocus?: boolean },
ref: Ref<HTMLInputElement>,
) => {
return (
Expand All @@ -76,7 +76,7 @@ export const ExplorerSearch = forwardRef(
placeholder={props.placeholder || "Search entities..."}
ref={ref}
autoComplete="off"
autoFocus
autoFocus={props.autoFocus}
/>
<Icon icon="cross" iconSize={12} onClick={props.clear} />
<Underline className="underline" />
Expand Down
1 change: 1 addition & 0 deletions app/client/src/pages/Editor/WidgetSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ const WidgetSidebar = (props: IPanelProps) => {
ref={searchInputRef}
clear={clearSearchInput}
placeholder="Search widgets..."
autoFocus={true}
/>

<MainWrapper>
Expand Down

0 comments on commit c344377

Please sign in to comment.