Skip to content

Commit 7acd240

Browse files
RockerbyRichard Ockerby
andauthored
fix: Case insensitivity when using combobox-avatar (#363)
Co-authored-by: Richard Ockerby <[email protected]>
1 parent f53c75d commit 7acd240

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/uui-combobox/lib/uui-combobox.story.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const avatars = [
6363
];
6464

6565
const basicFilter = (options: string[], search: string) =>
66-
options.filter(option => option.includes(search));
66+
options.filter(option => option.toLowerCase().includes(search.toLowerCase()));
6767

6868
const renderAvatar = (option: any) => html` <uui-combobox-list-option
6969
.displayValue=${option.name}
@@ -218,7 +218,9 @@ Avatars.args = {
218218
options: avatars,
219219
renderMod: (avatar: any) => renderAvatar(avatar),
220220
filter: (options: any[], search: string) =>
221-
options.filter(option => option.name.includes(search)),
221+
options.filter(option =>
222+
option.name.toLowerCase().includes(search.toLowerCase())
223+
),
222224
};
223225

224226
export const CountrySelect: Story = props => {

0 commit comments

Comments
 (0)