Skip to content

Commit 968de1b

Browse files
committed
Change focusSearchOnStart to focusSearchOnOpen
1 parent e93c128 commit 968de1b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/lib/interfaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface IStyledProps {
2222
export interface ISelectProps {
2323
options: Option[];
2424
value: Option[];
25-
focusSearchOnStart?: boolean;
25+
focusSearchOnOpen?: boolean;
2626
onChange?;
2727
valueRenderer?: (selected: Option[], options: Option[]) => string;
2828
ItemRenderer?: Function;

src/multi-select/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const MultiSelectBox = styled.div`
1515
`;
1616

1717
const MultiSelect = ({
18-
focusSearchOnStart = true,
18+
focusSearchOnOpen = true,
1919
hasSelectAll = true,
2020
shouldToggleOnHover = false,
2121
options,
@@ -49,7 +49,7 @@ const MultiSelect = ({
4949
onChange,
5050
disabled,
5151
disableSearch,
52-
focusSearchOnStart,
52+
focusSearchOnOpen,
5353
filterOptions,
5454
overrideStrings
5555
}}

src/select-panel/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface ISelectPanelProps {
1616
ItemRenderer?: Function;
1717
options: Option[];
1818
value: Option[];
19-
focusSearchOnStart: boolean;
19+
focusSearchOnOpen: boolean;
2020
selectAllLabel?: string;
2121
onChange: (selected: Option[]) => void;
2222
disabled?: boolean;
@@ -53,12 +53,12 @@ export const SelectPanel = (props: ISelectPanelProps) => {
5353
ItemRenderer,
5454
disabled,
5555
disableSearch,
56-
focusSearchOnStart,
56+
focusSearchOnOpen,
5757
hasSelectAll,
5858
overrideStrings
5959
} = props;
6060
const [searchText, setSearchText] = useState("");
61-
const [focusIndex, setFocusIndex] = useState(focusSearchOnStart ? FocusType.SEARCH : FocusType.NONE);
61+
const [focusIndex, setFocusIndex] = useState(focusSearchOnOpen ? FocusType.SEARCH : FocusType.NONE);
6262

6363
const selectAllOption = {
6464
label: selectAllLabel || getString("selectAll", overrideStrings),
@@ -123,7 +123,7 @@ export const SelectPanel = (props: ISelectPanelProps) => {
123123
{!disableSearch && (
124124
<SelectSearchContainer>
125125
<input
126-
autoFocus={focusSearchOnStart}
126+
autoFocus={focusSearchOnOpen}
127127
placeholder={getString("search", overrideStrings)}
128128
type="text"
129129
aria-describedby={getString("search", overrideStrings)}

0 commit comments

Comments
 (0)