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 shouldFilterProcessModel = (options: any) => {
|
||||||
const processModel: ProcessModel = options.item;
|
const processModel: ProcessModel = options.item;
|
||||||
const { inputValue } = options;
|
let { inputValue } = options;
|
||||||
return getFullProcessModelLabel(processModel)
|
if (!inputValue) {
|
||||||
.toLowerCase()
|
inputValue = '';
|
||||||
.includes((inputValue || '').toLowerCase());
|
}
|
||||||
|
const inputValueArray = inputValue.split(' ');
|
||||||
|
const processModelLowerCase =
|
||||||
|
getFullProcessModelLabel(processModel).toLowerCase();
|
||||||
|
|
||||||
|
return inputValueArray.every((i: any) => {
|
||||||
|
return processModelLowerCase.includes((i || '').toLowerCase());
|
||||||
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<ComboBox
|
<ComboBox
|
||||||
|
|
Loading…
Reference in New Issue