allow searching multiple words when searching for process models w/ burnettk
This commit is contained in:
parent
199cf05960
commit
f0a12b9818
|
@ -36,10 +36,17 @@ export default function ProcessModelSearch({
|
|||
|
||||
const shouldFilterProcessModel = (options: any) => {
|
||||
const processModel: ProcessModel = options.item;
|
||||
const { inputValue } = options;
|
||||
return getFullProcessModelLabel(processModel)
|
||||
.toLowerCase()
|
||||
.includes((inputValue || '').toLowerCase());
|
||||
let { inputValue } = options;
|
||||
if (!inputValue) {
|
||||
inputValue = '';
|
||||
}
|
||||
const inputValueArray = inputValue.split(' ');
|
||||
const processModelLowerCase =
|
||||
getFullProcessModelLabel(processModel).toLowerCase();
|
||||
|
||||
return inputValueArray.every((i: any) => {
|
||||
return processModelLowerCase.includes((i || '').toLowerCase());
|
||||
});
|
||||
};
|
||||
return (
|
||||
<ComboBox
|
||||
|
|
Loading…
Reference in New Issue