Skip to content

Conversation

@jpzwarte
Copy link
Member

Fixes #2766

Copilot AI review requested due to automatic review settings October 29, 2025 14:07
@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2025

🦋 Changeset detected

Latest commit: 18ffc02

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sl-design-system/search-field Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

🕸 Website preview

You can view a preview here (commit 18ffc027f90b9107f4357e67d127b4c91fa90280).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds debounced search functionality to the search field component. When users type, the sl-search event is now emitted automatically after 300ms of inactivity, rather than only on Enter key press.

Key changes:

  • Adds automatic debounced sl-search event emission (300ms delay) during typing
  • Cancels debounce timer when Enter is pressed or field is cleared
  • Skips emitting search events for empty/whitespace-only values

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/components/search-field/src/search-field.ts Implements debounce timer mechanism with input listener and helper methods
packages/components/search-field/src/search-field.spec.ts Adds comprehensive test coverage for debounced search behavior
.changeset/forty-showers-smash.md Documents the feature change, but mentions wrong event name

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

🕸 Storybook preview

You can view a preview here (commit 18ffc027f90b9107f4357e67d127b4c91fa90280).

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings October 29, 2025 14:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

@jpzwarte jpzwarte merged commit 891f599 into main Oct 31, 2025
9 of 13 checks passed
@jpzwarte jpzwarte deleted the fix/2766-search-field-search-event branch October 31, 2025 10:58
@github-actions github-actions bot mentioned this pull request Oct 28, 2025
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.

[Search] Add debounce for searching data and fetch an endpoint

3 participants