From ece33747a2c604fa5114e9830d6b76cc99102e54 Mon Sep 17 00:00:00 2001 From: sanguu Date: Mon, 19 Sep 2022 15:24:29 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=84=ED=96=89=EC=9D=B4=EB=A0=A5(=EA=B2=80?= =?UTF-8?q?=EC=83=89=EC=A1=B0=EA=B1=B4=EC=97=90=20=EB=94=B0=EB=A5=B8=20?= =?UTF-8?q?=EA=B0=92=20=EC=B6=94=EC=B6=9C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../history/AnalysisHistoryContainer.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/containers/analysis/history/AnalysisHistoryContainer.js b/src/containers/analysis/history/AnalysisHistoryContainer.js index 3f3e52c..00e94e5 100644 --- a/src/containers/analysis/history/AnalysisHistoryContainer.js +++ b/src/containers/analysis/history/AnalysisHistoryContainer.js @@ -96,7 +96,8 @@ export const AnalysisHistoryContainer = props => { const [params, setParams] = useState({ stDate: moment().subtract(1, 'day').format('YYYY-MM-DD'), endDate: moment().subtract(-1, 'day').format('YYYY-MM-DD'), - search1: '' + search1: '', + groupId: searchData.groupId }); const excelHeaders = [ @@ -213,11 +214,12 @@ export const AnalysisHistoryContainer = props => { setParams({ stDate: searchParams.stDate, endDate: searchParams.endDate, - search1: searchParams.search1 + search1: searchParams.search1, + groupId: searchData.groupId }); - } - // handlerSearch(); - }, []); + } + handlerSearch(); + }, [searchData]); const onKeyPress = e => { if (e.key == 'Enter') { @@ -228,20 +230,20 @@ export const AnalysisHistoryContainer = props => { useEffect(() => { }, [params]); const handlerSearch = () => { - + console.log("----",params); dispatch(Actions.list.request({ searchParams: params })); }; const handlerInput = (type, val) => { if (type === 'search1') { - setParams({ ...params, search1: val }); + setParams({ ...params, search1: val}); } if (type === 'searchDate') { if (val.length == 2) { setParams({ ...params, stDate: moment(val[0]).format('YYYY-MM-DD'), - endDate: moment(val[1]).format('YYYY-MM-DD') + endDate: moment(val[1]).format('YYYY-MM-DD'), }); } }