조회조건 필터 랜더링에 이슈로 컴포넌트 분리작업
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { memo, useEffect, useState } from 'react';
|
||||
import { styled } from 'styled-components';
|
||||
import { TextInput, InputLabel, SelectInput } from '../../../styles/Components';
|
||||
import { logDomain, opInputType } from '../../../assets/data/options';
|
||||
|
||||
const TextInputWithHelp = memo(({ helpText, ...props }) => {
|
||||
return (
|
||||
<TextInputWrapper>
|
||||
<TextInput {...props} />
|
||||
{helpText && <HelpText>{helpText}</HelpText>}
|
||||
</TextInputWrapper>
|
||||
);
|
||||
});
|
||||
|
||||
const SearchFilter = ({ value = [], onChange }) => {
|
||||
const [filters, setFilters] = useState(value || []);
|
||||
const [filterSections, setFilterSections] = useState([{ field_name: '', field_type: 'String', value: '' }]);
|
||||
@@ -55,14 +64,7 @@ const SearchFilter = ({ value = [], onChange }) => {
|
||||
setIsOpen(!isOpen);
|
||||
};
|
||||
|
||||
const TextInputWithHelp = ({ helpText, ...props }) => {
|
||||
return (
|
||||
<TextInputWrapper>
|
||||
<TextInput {...props} />
|
||||
{helpText && <HelpText>{helpText}</HelpText>}
|
||||
</TextInputWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<FilterWrapper>
|
||||
|
||||
Reference in New Issue
Block a user