Skip to content
Source
Sign inSign up
TanStack/query

Devtools (React) "Filter" field, when used, makes "Sort" dropdown, "Asc / Desc" and "offline" buttons disappear #4989

Send to my agent
Closedemzoumpo(GitHub profile, opens in a new tab) opened this issue 2 comments

Describe the bug

The "Filter" field of Devtools makes the other fields (Sort, asc/desc, offline) disappear when used. Even though the are used to sort the filtered results, one can only change the sorting and the rest of the options when the "filter" field is cleared.

Your minimal, reproducible example

Attached video below

Steps to reproduce

  1. Open Tanstack (React) Query Devtools
  2. Add a filter on the "filter" field
  3. The rest of the fields disappear

Expected behavior

As a user, I expect the fields to not disappear when populating some of them with data.

How often does this bug happen?

Every time

Screenshots or Videos

https://user-images.githubusercontent.com/2103443/219364287-b6d127ee-8793-4261-a4cb-71ec48957281.mov

Platform

Mac OS, Chrome 110

TanStack Query version

v4.24.4

TypeScript version

v4.9.5

Additional context

No response

  1. looking at the code, we do have a condition to only render the rest when there is no filter. But that seems weird to me. Maybe sorting wasn't needed when something was filtered, but I'd rather keep the ui the same all the time.

    would you like to contribute a fix ?

  2. TkDodo added labelspackage: react-query-devtools

  3. @TkDodo I'd be happy to contribute a fix!

  4. TkDodo closed this

Sign in to join this conversation.