Skip to content

Commit

Permalink
fix(search-input): onsubmit (#34)
Browse files Browse the repository at this point in the history
Co-authored-by: Eduardo Spada <eduardo.spada@platformbuilders.io>
  • Loading branch information
duspada and duspada-builders authored Dec 22, 2020
1 parent 62d7fef commit a409cab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@platformbuilders/react-elements",
"version": "0.0.19",
"version": "0.0.20",
"description": "Platform Builders Shared Components Library For React Web and Native",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions src/native/components/SearchInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Props = {
inputStyle?: StyleProp<TextStyle>;
containerStyle?: StyleProp<ViewStyle>;
placeholderTextColor?: string;
onSubmit?(): void;
};

const SearchInput: React.FC<Props> = ({
Expand All @@ -40,6 +41,7 @@ const SearchInput: React.FC<Props> = ({
containerStyle,
placeholderTextColor,
textStyle,
onSubmit = () => null,
}) => {
const [searchText, setSearchText] = useState('');
const [isSearching, setSearching] = useState(false);
Expand Down Expand Up @@ -93,6 +95,7 @@ const SearchInput: React.FC<Props> = ({
iconColor={iconColor}
iconSize={iconSize}
inputPadding={inputPadding}
onSubmitEditing={onSubmit}
/>
</Wrapper>
);
Expand Down

0 comments on commit a409cab

Please sign in to comment.