File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -306,13 +306,9 @@ export const AutocompleteDropdown = memo<
306306
307307 const newSet = initialDataSet . filter ( ( item : AutocompleteDropdownItem ) => {
308308 const titleLowercase = ( item . title || '' ) . toLowerCase ( )
309- let findWhere : string
310-
311- if ( caseSensitive ) {
312- findWhere = ignoreAccents ? diacriticless ( item . title || '' ) : item . title || ''
313- } else {
314- findWhere = ignoreAccents ? diacriticless ( titleLowercase ) : titleLowercase
315- }
309+ const titleStr = item . title || ''
310+ const title = caseSensitive ? titleStr : titleStr . toLowerCase ( )
311+ const findWhere = ignoreAccents ? diacriticless ( title ) : title
316312
317313 if ( matchFromStart ) {
318314 return typeof item . title === 'string' && findWhere . startsWith ( findWhat )
You can’t perform that action at this time.
0 commit comments