Refactor: make global variables search input case insensitive
This commit is contained in:
parent
15de984bb6
commit
2fa7df09dc
2 changed files with 6 additions and 5 deletions
|
|
@ -173,7 +173,7 @@ export default function InputComponent({
|
|||
>
|
||||
<Command
|
||||
filter={(value, search) => {
|
||||
if (value.includes(search) || value.includes("doNotFilter-"))
|
||||
if (value.toLowerCase().includes(search.toLowerCase()) || value.includes("doNotFilter-"))
|
||||
return 1; // ensures items arent filtered
|
||||
return 0;
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -41,14 +41,15 @@ export default function GlobalVariablesPage() {
|
|||
useEffect(() => {
|
||||
const rows:Array<{type: string | undefined; id: string;
|
||||
name: string;default_fields:string | undefined}> = [];
|
||||
globalVariablesEntries.forEach((e) => {
|
||||
const globalVariableObj = globalVariables[e];
|
||||
console.log(globalVariableObj);
|
||||
|
||||
globalVariablesEntries.forEach((entrie) => {
|
||||
const globalVariableObj = globalVariables[entrie];
|
||||
|
||||
rows.push({
|
||||
type: globalVariableObj.type,
|
||||
id: globalVariableObj.id,
|
||||
default_fields: (globalVariableObj.default_fields??[]).join(", "),
|
||||
name: e,
|
||||
name: entrie,
|
||||
});
|
||||
});
|
||||
console.log(rows);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue