Added selected header navigation BOD-164

This commit is contained in:
Patrick Fic
2020-09-09 11:57:58 -07:00
parent 637670da50
commit eff6f361ee
31 changed files with 309 additions and 76 deletions

View File

@@ -32,7 +32,7 @@ const JobSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => {
const [option, setOption] = useState(value);
useEffect(() => {
if (value === option) {
if (value === option && value) {
callIdSearch({ variables: { id: value } });
}
}, [value, option, callIdSearch]);
@@ -46,7 +46,7 @@ const JobSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => {
const handleSelect = (value) => {
setOption(value);
if (value !== option && onChange) {
onChange(option);
onChange(value);
}
};
@@ -69,6 +69,7 @@ const JobSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => {
filterOption={false}
onSearch={handleSearch}
// onChange={setOption}
onChange={handleSelect}
onSelect={handleSelect}
notFoundContent={loading ? <LoadingOutlined /> : <Empty />}
onBlur={onBlur}