diff --git a/src/components/basis/flight/plan/FlightPlanPilot.js b/src/components/basis/flight/plan/FlightPlanPilot.js
index 1b42f5d..ef4d784 100644
--- a/src/components/basis/flight/plan/FlightPlanPilot.js
+++ b/src/components/basis/flight/plan/FlightPlanPilot.js
@@ -2,8 +2,10 @@ import React from 'react';
import {Button, Card, CardBody, Col, CustomInput, Row, FormGroup, Input, Label} from 'reactstrap';
import {Search} from 'react-feather';
import {GridDatabase} from '../../../crud/grid/GridDatatable';
+import { AiOutlineSearch } from 'react-icons/ai';
-const FlightPlanPilot = ({ pilotList, handleSelectPilot, returnPilot, onClickEvent, setInputVal }) => {
+const FlightPlanPilot = ({ pilotList, handleSelectPilot, returnPilot, onClickEvent, onChange, inputVal }) => {
+
const columns = [
{id: 'groupNm', name: '그룹 명', cell: row => (
{row.groupNm}
)},
{id: 'memberName', name: '성명', cell: row => ({row.memberName}
)},
@@ -18,7 +20,6 @@ const FlightPlanPilot = ({ pilotList, handleSelectPilot, returnPilot, onClickEve
}
}
];
-
return (
<>
@@ -56,8 +57,8 @@ const FlightPlanPilot = ({ pilotList, handleSelectPilot, returnPilot, onClickEve
type='text'
id='memberName'
name='memberName'
- // value={props.params.groupNm}
- onChange={(e) => {setInputVal(e.target.value)}}
+ value={inputVal}
+ onChange={onChange}
bsSize='sm'
// onKeyPress={props.onKeyPress}
placeholder='성명을 입력하세요'
diff --git a/src/containers/basis/flight/plan/FlightPlanPilotContainer.js b/src/containers/basis/flight/plan/FlightPlanPilotContainer.js
index 1c11230..f145e65 100644
--- a/src/containers/basis/flight/plan/FlightPlanPilotContainer.js
+++ b/src/containers/basis/flight/plan/FlightPlanPilotContainer.js
@@ -8,6 +8,7 @@ const FlightPlanPilotContainer = ({handleModal, type}) => {
const { pilotList, selectGroup } = useSelector(state => state.flightState);
const [returnPilot, setReturnPilot] = useState('');
const [inputVal , setInputVal] = useState('');
+ const [text, setText] = useState('');
/* 조종사 조회 */
@@ -35,18 +36,20 @@ const FlightPlanPilotContainer = ({handleModal, type}) => {
}, [])
useEffect(()=> {
- console.log('>>>>')
if(pilotList) {
onTest();
}
},[pilotList])
-
+ const onChange = (e) => {
+ setInputVal(e.target.value);
+ };
const onClickEvent= (e)=> {
- setInputVal(e.target.value);
+
onTest();
+ setInputVal('');
}
const onTest = () => {
@@ -56,8 +59,7 @@ const FlightPlanPilotContainer = ({handleModal, type}) => {
if(inputVal==''){
setReturnPilot(unit)
}else if(unit.memberName.includes(inputVal)){
- //이부분 문제있어서 임시로 inputVal값과 동일한 값을 넣어둠... 해결해야함...아악
- setReturnPilot(unit)
+ setReturnPilot(MATCHVALUE)
}else if (inputVal != ''){
setReturnPilot('')
}
@@ -68,9 +70,11 @@ const FlightPlanPilotContainer = ({handleModal, type}) => {
handleSelectPilot={handleSelectPilot}
handleSearch={handleSearch}
onClickEvent={onClickEvent}
+ onChange={onChange}
pilotList={pilotList}
returnPilot={returnPilot}
setInputVal={setInputVal}
+ inputVal={inputVal}
/>
)