Kaynağa Gözat

Remove obsolete Input componhent

Tatiana Inama 6 yıl önce
ebeveyn
işleme
b05371441b

+ 0 - 9
recipes/src/components/Input/index.tsx

@@ -2,15 +2,6 @@ import React, { InputHTMLAttributes, ChangeEvent, forwardRef } from 'react';
 
 import './styles.scss';
 
-export const Input2: React.FunctionComponent<InputHTMLAttributes<{}>> = (props) => (
-	<div className='cbk-input-2'>
-		<input
-			{...props}
-		/>
-		<span></span>
-	</div>
-)
-
 type InputProps = {
 	[x: string]: any,
 	label?: string,

+ 3 - 3
recipes/src/components/RecipeSearch/index.tsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { DBRecipe } from 'types/recipes';
 
-import { Input2 as Input} from 'components/Input';
+import { Input } from 'components/Input';
 import List from 'components/List';
 
 import { getRecipes } from 'containers/Recipes/services';
@@ -83,9 +83,9 @@ class RecipeSearch extends React.Component<Props, State> {
     })
   }
 
-  changeQuery = (event: React.ChangeEvent<HTMLInputElement>) => {
+  changeQuery = (event: React.FormEvent<HTMLInputElement>) => {
     this.setState({
-      search: event.target.value,
+      search: event.currentTarget.value,
       openResult: true,
     }, () => {
       this.autocompleteSearch(this.state.search)