G
YouTube TikTok Games
Skip to content

[Bug]: Rapid table and database searches are not debounced #4411

Open

Description

@hutiefang76

What happened?

Rapid typing schedules one search per input event because each event creates a separate debounce wrapper. Clearing the field leaves earlier callbacks pending, and pending callbacks survive component unmount.

Expected: one request for the final keyword per field after 300ms; clear replaces the pending search; unmount cancels callbacks that have not run.

Affects Versions

master at 061eb72

What table formats are you seeing the problem on?

No response

What engines are you seeing the problem on?

No response

How to reproduce

  1. Open the dashboard table/database menu.
  2. Type several characters into either search field within 300ms.
  3. Inspect the search requests: every pending callback runs instead of only the last.
  4. Repeat while clearing the field or leaving the view before 300ms. Earlier pending callbacks still run.

Relevant log output

Anything else

The regression runner compiles and mounts the actual TablesMenu setup with fake timers. All five cases fail on the base and pass with per-instance timers and unmount cleanup. A tested fix is ready in hutiefang76/amoro branch fix/table-menu-search-debounce.

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions