diff --git a/src/components/basis/flight/plan/FlightPlanArcrft.js b/src/components/basis/flight/plan/FlightPlanArcrft.js index cca6138..5ed285f 100644 --- a/src/components/basis/flight/plan/FlightPlanArcrft.js +++ b/src/components/basis/flight/plan/FlightPlanArcrft.js @@ -3,7 +3,7 @@ import {Button, Card, CardBody, Col, CustomInput, Row, FormGroup, Input, Label} import {Search} from 'react-feather'; import {GridDatabase} from '../../../crud/grid/GridDatatable'; -const FlightPlanArcrft = ({ arcrftList, handleSelectArcrft, onClickEvent, setInputVal, returnArcrft }) => { +const FlightPlanArcrft = ({ arcrftList, handleSelectArcrft, onClickEvent, inputVal, returnArcrft,onChange }) => { const columns = [ {id: 'groupNm', name: '그룹 명', cell: row => (
{row.groupNm}
)}, {id: 'arcrftModelNm', name: '모델 명', cell: row => (
{row.arcrftModelNm}
)}, @@ -57,8 +57,8 @@ const FlightPlanArcrft = ({ arcrftList, handleSelectArcrft, onClickEvent, setInp type='text' id='ownerNm' name='ownerNm' - // value={props.params.groupNm} - onChange={(e) => {setInputVal(e.target.value)}} + value={inputVal} + onChange={onChange} bsSize='sm' // onKeyPress={props.onKeyPress} placeholder='소유자 명을 입력하세요' 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/dron/BasisDronContainer.js b/src/containers/basis/dron/BasisDronContainer.js index 2900e6d..0098713 100644 --- a/src/containers/basis/dron/BasisDronContainer.js +++ b/src/containers/basis/dron/BasisDronContainer.js @@ -196,7 +196,8 @@ export const BasisDronContainer = props => { }; const handlerCancel = () => { - dispatch(Actions.SELECT({ groupId: '', groupNm: '' })); + dispatch(Actions.SELECT()); + setParams({ ...params, diff --git a/src/containers/basis/flight/plan/FlightPlanArcrftContainer.js b/src/containers/basis/flight/plan/FlightPlanArcrftContainer.js index 0100b1b..d709604 100644 --- a/src/containers/basis/flight/plan/FlightPlanArcrftContainer.js +++ b/src/containers/basis/flight/plan/FlightPlanArcrftContainer.js @@ -38,7 +38,11 @@ const FlightPlanArcrftContainer = ({handleModal, type}) => { setInputVal(e.target.value); onTest(); + setInputVal(''); } + const onChange = (e) => { + setInputVal(e.target.value); + }; useEffect(()=> { console.log('>>>>') if(arcrftList) { @@ -53,7 +57,7 @@ const FlightPlanArcrftContainer = ({handleModal, type}) => { if(inputVal==''){ setReturnArcrft(unit) }else if(unit.ownerNm.includes(inputVal)){ - setReturnArcrft(unit) + setReturnArcrft(MATCHVALUE) }else if (inputVal != ''){ setReturnArcrft('') } @@ -67,6 +71,8 @@ const FlightPlanArcrftContainer = ({handleModal, type}) => { returnArcrft={returnArcrft} setInputVal={setInputVal} onClickEvent={onClickEvent} + inputVal={inputVal} + onChange={onChange} /> ) } diff --git a/src/containers/basis/flight/plan/FlightPlanPilotContainer.js b/src/containers/basis/flight/plan/FlightPlanPilotContainer.js index 1c11230..8dd72f2 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} /> )