Skip to content

Commit

Permalink
fix(datatable): search not working with uppercase characters in query (
Browse files Browse the repository at this point in the history
…carbon-design-system#11493)

### Related Ticket(s)

Closes carbon-design-system#11483

### Description

Search is not working as expected with uppercase characters in query string.

### Changelog

**Changed**

- Updated the search logic to convert the query string as well as the main string to lowercase and then compare.

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
sangeethababu9223 authored Feb 6, 2024
1 parent 7939d12 commit 2b0274c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class CDSTable extends HostListenerMixin(LitElement) {
*/
@property()
filterRows = (rowText: string, searchString: string) =>
rowText.toLowerCase().indexOf(searchString) < 0;
rowText.toLowerCase().indexOf(searchString.toLowerCase()) < 0;

/**
* The total headers
Expand Down

0 comments on commit 2b0274c

Please sign in to comment.