From 7ce22d7267203f150a511cc71cb60d749b13df25 Mon Sep 17 00:00:00 2001 From: chenos Date: Sat, 2 Jan 2021 09:18:55 +0800 Subject: [PATCH] fix: input control can not input chinese --- .../components/form.fields/filter/index.tsx | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/app/src/components/form.fields/filter/index.tsx b/packages/app/src/components/form.fields/filter/index.tsx index ef81caf22..2b1a47394 100644 --- a/packages/app/src/components/form.fields/filter/index.tsx +++ b/packages/app/src/components/form.fields/filter/index.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; import { Button, Select, Input, Space, Form, InputNumber, DatePicker, TimePicker, Radio } from 'antd'; import { PlusCircleOutlined, CloseCircleOutlined } from '@ant-design/icons'; import useDynamicList from './useDynamicList'; @@ -225,9 +225,9 @@ const op = { }; const StringInput = (props) => { - const { onChange, ...restProps } = props; + const {value, onChange, ...restProps } = props; return ( - { + { onChange(e.target.value); }}/> ); @@ -375,10 +375,16 @@ export function FilterItem(props: FilterItemProps) { {option.label} ))} */} - { - onChange({...dataSource, value: value}); - }} - style={{ width: 180 }} + { + onChange({...dataSource, value: value}); + }} + style={{ width: 180 }} /> {showDeleteButton && (