Skip to content

Commit

Permalink
[ui] Fix case sensitivity in launchpad partition picker (#23916)
Browse files Browse the repository at this point in the history
## Summary & Motivation

I noticed that on one of my assets with string partition names,
searching for the partition in the asset launchpad is case-sensitive. It
shouldn't be.

## How I Tested These Changes

View asset with named partitions, open launchpad. Search for a
partition, verify that it appears regardless of query case.

## Changelog [New | Bug | Docs]

[ui] Fix case sensitivity when searching for partitions in the
launchpad.
  • Loading branch information
hellendag authored Aug 28, 2024
1 parent cd3e72a commit 63ef143
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ const ConfigEditorPartitionPicker = React.memo((props: ConfigEditorPartitionPick
items={partitions}
inputProps={inputProps}
inputValueRenderer={(partition) => partition}
itemPredicate={(query, partition) => query.length === 0 || partition.includes(query)}
itemPredicate={(query, partition) => {
const sanitized = query.trim().toLocaleLowerCase();
return sanitized.length === 0 || partition.toLocaleLowerCase().includes(sanitized);
}}
itemRenderer={(partition, props) => (
<MenuItem
active={props.modifiers.active}
Expand Down

1 comment on commit 63ef143

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-h7toaerr9-elementl.vercel.app

Built with commit 63ef143.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.