You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recently been building some tables with tanstack table and I've come across some situations where I have a column with boolean values and I want to include that (transformed) in the global filter.
I'm trying to have a column of boolean type which is globally searchable using some transforming logic. I want to transform the boolean to a string when searching/somewhere else if possible and pass that to the global filter.
Possible solution
I could just store the transformed string in the column instead of the boolean (eg. "Online"/"Offline" instead of online: true/false). I would like to avoid this if possible, but if using strings is preferred in tanstack table then let me know.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all!
I've recently been building some tables with tanstack table and I've come across some situations where I have a column with boolean values and I want to include that (transformed) in the global filter.
Simple reproduction: https://stackblitz.com/edit/vitejs-vite-vej6boy5?file=src%2Fmain.tsx
Line in tanstack table that is causing it (I think):
table/packages/table-core/src/features/GlobalFiltering.ts
Line 116 in db745af
Goal
I'm trying to have a column of boolean type which is globally searchable using some transforming logic. I want to transform the boolean to a string when searching/somewhere else if possible and pass that to the global filter.
Possible solution
I could just store the transformed string in the column instead of the boolean (eg. "Online"/"Offline" instead of online: true/false). I would like to avoid this if possible, but if using strings is preferred in tanstack table then let me know.
Beta Was this translation helpful? Give feedback.
All reactions