조회조건 필터 랜더링에 이슈로 컴포넌트 분리작업

This commit is contained in:
2025-05-12 10:46:13 +09:00
parent 1cc20b65e2
commit b5efab7755

View File

@@ -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>