Skip to content

UserManagementTable search does not filter users (listUsers query params not applied) #2

@jfut

Description

@jfut

Thank you for the wonderful Better Auth UI components!

Summary

UserManagementTable search input updates the UI state, but user results are not filtered.
This was reproduced with better-auth@1.6.5.

Environment

  • @bettercone/ui: 0.5.2
  • better-auth: 1.6.5
  • React: 19.2.5

Steps to Reproduce

  1. Set up AuthUIProvider with admin plugin enabled.
  2. Render UserManagementTable.
  3. Open the admin page with multiple users.
  4. Type a unique value into the search box (e.g. part of one user's email).

Actual Behavior

  • The table keeps showing all users.
  • Network requests to /api/auth/admin/list-users are sent, but without searchValue in query params in this flow.
  • Result remains unfiltered.

Expected Behavior

  • Typing in search should send searchValue (and other search params) correctly.
  • /api/auth/admin/list-users should return filtered users.
  • Table should show filtered results.

Notes

From debugging, this looks related to how authClient.admin.listUsers(...) is called in UserManagementTable for GET endpoints.
With better-auth@1.6.5, passing search params via query works as expected.

Temporary Workaround

We patched authClient.admin.listUsers to normalize:

  • from: listUsers({ searchValue, searchField, ... })
  • to: listUsers({ query: { searchValue, searchField, ... } })

After that, filtering works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions