Skip to content

Conversation

@noctillion
Copy link
Contributor

This PR add a -clear- button to the search input. The button appears dynamically when a text query is present, allowing users to reset the search field updatings the URL parameters in a single click.

@davidlougheed davidlougheed changed the title add clear buttor to text search add clear button to text search Jan 15, 2026
@davidlougheed davidlougheed changed the title add clear button to text search feat: add clear button to text search Jan 15, 2026
<Form.Item name="q" initialValue="" noStyle={true}>
<Input prefix={<SearchOutlined />} />
</Form.Item>
{!!textQuery && <Button icon={<CloseOutlined />} onClick={onReset} />}
Copy link
Member

Choose a reason for hiding this comment

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

add a disabled prop to the button to disable it when discoveryStatus === RequestStatus.Pending to visually indicate that the button should/cannot be triggered while a request is ongoing

const onFinish = useCallback(
(values: FreeTextFormValues) => {
const query = values.q.trim();
const navigateToTextQuery = useCallback(
Copy link
Member

Choose a reason for hiding this comment

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

looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants