mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-12 18:44:14 +00:00
allow searching multiple words when searching for process models w/ burnettk
This commit is contained in:
parent
85626ba399
commit
fba0860227
@ -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…
x
Reference in New Issue
Block a user