Skip to content

Commit

Permalink
feat(placeholder): add placeholder property in VSearchSelect
Browse files Browse the repository at this point in the history
  • Loading branch information
gsi-rafaelmayor committed Dec 10, 2020
1 parent ed8ebb5 commit 6e45b7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/Form/Inputs/SearchSelect/SearchSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ interface IProps {
treeChildIndentWidth?: number;
getValueOnSelectMenuItem?: boolean;
isLoading?: boolean;
placeholder?: string;
}

export const SearchSelect = (props: IProps) => {
Expand Down Expand Up @@ -338,7 +339,7 @@ export const SearchSelect = (props: IProps) => {
/>
}
onChange={onSearchChange}
placeholder={'Search Items'}
placeholder={props?.placeholder ?? 'Search'}
value={search}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export const VSearchSelectField = observer((props: ISearchSelectFieldProps) => {
displayAsTree,
treeChildIndentWidth,
getValueOnSelectMenuItem,
loading
loading,
placeholder
} = props;

useEffect(() => {
Expand Down Expand Up @@ -132,6 +133,7 @@ export const VSearchSelectField = observer((props: ISearchSelectFieldProps) => {
treeChildIndentWidth={treeChildIndentWidth}
getValueOnSelectMenuItem={getValueOnSelectMenuItem}
isLoading={loading}
placeholder={placeholder}
/>
</FormFieldContainer>
</StyledPopOverWrapper>
Expand Down

0 comments on commit 6e45b7f

Please sign in to comment.