Comments (3)
I think I've figured out what the issue is. If we exclude the filter for the id (as shown in the tutorial code - first example above), then when the column is hidden, there is no longer any data to filter on, hence all the rows are removed from the table!
To overcome this, add the "includeHiddenColumns" option to the table filter as below:
const table = createTable(readable(data), {
page: addPagination(),
sort: addSortBy({ disableMultiSort: true }),
filter: addTableFilter({
includeHiddenColumns: true,
fn: ({ filterValue, value }) => value.includes(filterValue)
}),
hide: addHiddenColumns(),
select: addSelectedRows()
});
Could someone add this to the tutorial code please (and make the adjustments to the preview/code section also).
Thanks
from shadcn-svelte.
Please provide a reproduction.
More info
Why do I need to provide a reproduction?
This project is maintained by a very small team, and we simply don't have the bandwidth to investigate issues that we can't easily replicate. Reproductions enable us to fix issues faster and more efficiently. If you care about getting your issue resolved, providing a reproduction is the best way to do that.
I've provided a reproduction - what happens now?
Once a reproduction is provided, we'll remove the needs reproduction
label and review the issue to determine how to resolve it. If we can confirm it's a bug, we'll label it as such and prioritize it based on its severity.
If needs reproduction
labeled issues don't receive any activity (e.g., a comment with a reproduction link), they'll be closed. Feel free to comment with a reproduction at any time and the issue will be reopened.
How can I create a reproduction?
You can use this template to create a minimal reproduction. You can also link to a GitHub repository with the reproduction.
Please ensure that the reproduction is as minimal as possible. If there is a ton of custom logic in your reproduction, it is difficult to determine if the issue is with your code or with the library. The more minimal the reproduction, the more likely it is that we'll be able to assist.
You might also find these other articles interesting and/or helpful:
from shadcn-svelte.
This issue was closed because it was open for 7 days without a reproduction.
from shadcn-svelte.
Related Issues (20)
- Switch style from default to new york HOT 2
- Reformat files after adding or updating components HOT 1
- Add choice flags for `init` command
- Can we please move from svelte-headless-table to tanstack table? Since svelte-headless-table is no longer actively maintained HOT 7
- Tab component missing defaultValue prop HOT 1
- Adding system agnostic dark mode without js HOT 3
- feat: --nodep or similar flag for init CLI command HOT 5
- Vaul Svelte Link Broken
- Broken links due to directory renaming from apps/www/** to sites/docs/** HOT 2
- Add Time-line (Vertical, Horizontal) HOT 2
- Wrong line highlighted in Data Table Documentations HOT 1
- Specify @internationalized/date version when installing Calendar components
- Data Table - a combination of Pagination and Sort removes the sort property from the props object
- #1203 Breaks paths to component source HOT 5
- Wrong Home and Line Chart icons in Blocks Dashboards
- Drawer Overlay receives an unexpected slot
- When using TypeScript, path generated still use JavaScript HOT 2
- Checkbox: peer-checked doesn't work HOT 1
- dialog and dropdown-menu: dialog overlaps dropdown-menu on pressing esc button
- Cannot programmatically change values for things like tabs or dialogs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shadcn-svelte.