Skip to content

Commit

Permalink
fix: LaunchDevly: Search clear not clearing filter (#424)
Browse files Browse the repository at this point in the history
* Fix search clear not clearing filter

* Remove logs
  • Loading branch information
cdelst authored Sep 13, 2024
1 parent 216dc95 commit dd9df47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/dev_server/ui/src/EnvironmentSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ export function EnvironmentSelector({
<Input
id="environmentSearch"
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
onChange={(e) => setSearchQuery(e.target.value || '')}
placeholder="Search environments..."
aria-label="Search environments"
/>
</div>
<span
Expand Down
4 changes: 3 additions & 1 deletion internal/dev_server/ui/src/Flags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function Flags({
</Box>
<Stack gap="4">
<Inline gap="4">
<SearchField>
<SearchField aria-label="Search flags">
<Group>
<Icon name="search" size="small" />
<Input
Expand All @@ -231,12 +231,14 @@ function Flags({
setSearchTerm(e.target.value);
setCurrentPage(0); // Reset pagination
}}
aria-label="Search flags input"
/>
<IconButton
aria-label="clear"
icon="cancel-circle-outline"
size="small"
variant="minimal"
onPress={() => setSearchTerm('')}
/>
</Group>
</SearchField>
Expand Down

0 comments on commit dd9df47

Please sign in to comment.