Full search, case insensitive

This commit is contained in:
femsci 2023-10-22 10:17:12 +02:00
parent dffb9eec84
commit 6d15c94dbe
Signed by: femsci
GPG key ID: 08F7911F0E650C67

View file

@ -163,7 +163,20 @@ const WarningsList: React.FC = () => {
return true; return true;
} }
return ((x.col7 as any).val as string).includes(searchValue); return (
((x.col7 as any).val as string)
.toLowerCase()
.includes(searchValue.toLowerCase()) ||
((x.col3 as any).val as string)
.toLowerCase()
.includes(searchValue.toLowerCase()) ||
((x.col6 as any).val as string)
.toLowerCase()
.includes(searchValue.toLowerCase()) ||
((x.col9 as any).val as string)
.toLowerCase()
.includes(searchValue.toLowerCase())
);
}) })
.map((warningContent, key) => ( .map((warningContent, key) => (
<IonItem <IonItem
@ -209,7 +222,7 @@ const WarningsList: React.FC = () => {
<IonItem> <IonItem>
<IonLabel className={`${styles.label} ion-text-wrap`}> <IonLabel className={`${styles.label} ion-text-wrap`}>
<h1>{(currentlySelectedWarning as any).col5.val}</h1> <h1>{(currentlySelectedWarning as any).col5.val}</h1>
<p>firma</p> <p>producent</p>
</IonLabel> </IonLabel>
</IonItem> </IonItem>
<IonItem> <IonItem>