From e38387534ae95c685cc51a6b4192a539ce7c18fc Mon Sep 17 00:00:00 2001 From: Florian BOUILLON Date: Thu, 10 Jun 2021 16:58:07 +0200 Subject: [PATCH] Filtering is now case insensitive Signed-off-by: Florian BOUILLON --- src/dzeio/Input/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dzeio/Input/index.tsx b/src/dzeio/Input/index.tsx index 32b0426..634c1c8 100644 --- a/src/dzeio/Input/index.tsx +++ b/src/dzeio/Input/index.tsx @@ -172,7 +172,7 @@ export default class Input extends React.Component { {this.props.autocomplete && this.props.autocomplete.indexOf(this.state?.value ?? this.props.value?.toString() ?? '') === -1 && (
    - {this.props.autocomplete.filter((item) => item.includes(this.state?.value ?? this.props.value?.toString() ?? '')).map((item) => (
  • {item}
  • ))} + {this.props.autocomplete.filter((item) => item.toLowerCase().includes(this.state?.value?.toLowerCase() ?? this.props.value?.toString().toLowerCase() ?? '')).map((item) => (
  • {item}
  • ))}
)}