From 63ef143cea37328de9acef0db814683e0c143af2 Mon Sep 17 00:00:00 2001 From: Isaac Hellendag <2823852+hellendag@users.noreply.github.com> Date: Wed, 28 Aug 2024 09:21:48 -0500 Subject: [PATCH] [ui] Fix case sensitivity in launchpad partition picker (#23916) ## 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. --- .../ui-core/src/launchpad/ConfigEditorConfigPicker.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigEditorConfigPicker.tsx b/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigEditorConfigPicker.tsx index 3f95d51b641ea..58f964cf3c6bd 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigEditorConfigPicker.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/ConfigEditorConfigPicker.tsx @@ -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) => (