-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
10409: Delete old SelectSearch related functions
- Loading branch information
Zachary Rogers
committed
Sep 24, 2024
1 parent
7d8e835
commit 15d313b
Showing
4 changed files
with
1 addition
and
330 deletions.
There are no files selected for viewing
163 changes: 1 addition & 162 deletions
163
web-client/src/ustc-ui/Utils/documentTypeSelectHelper.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,3 @@ | ||
export const fileDocumentPrimaryOnChange = ({ | ||
action, | ||
inputValue, | ||
updateSequence, | ||
validateSequence, | ||
}) => { | ||
switch (action) { | ||
case 'select-option': | ||
[ | ||
'category', | ||
'documentType', | ||
'documentTitle', | ||
'eventCode', | ||
'scenario', | ||
].forEach(key => | ||
updateSequence({ | ||
key, | ||
value: inputValue[key], | ||
}), | ||
); | ||
validateSequence(); | ||
break; | ||
case 'clear': | ||
updateSequence({ | ||
key: 'category', | ||
value: '', | ||
}); | ||
validateSequence(); | ||
break; | ||
} | ||
}; | ||
|
||
export const docketEntryOnChange = ({ | ||
action, | ||
inputName, | ||
inputValue, | ||
updateSequence, | ||
validateSequence, | ||
}) => { | ||
switch (action) { | ||
case 'select-option': | ||
updateSequence({ | ||
key: inputName, | ||
value: inputValue.value, | ||
}); | ||
validateSequence(); | ||
break; | ||
case 'clear': | ||
updateSequence({ | ||
key: inputName, | ||
value: '', | ||
}); | ||
validateSequence(); | ||
break; | ||
} | ||
return true; | ||
}; | ||
|
||
export const onInputChange = ({ action, inputText, updateSequence }) => { | ||
if (action === 'input-change') { | ||
updateSequence({ | ||
key: 'searchText', | ||
value: inputText, | ||
}); | ||
} | ||
}; | ||
|
||
export const reactSelectValue = ({ documentTypes, selectedEventCode }) => { | ||
return documentTypes.filter(option => option.eventCode === selectedEventCode); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.