Comments (7)
Can you create a reproducible example on https://codesandbox.io/ ?
from react-table-library.
please go through: https://codesandbox.io/s/bold-sunset-emyb4o?file=/src/DataTable.js
I replicated the exact issue i am facing.
Please change index.js file to the following:
Hope you can help!
from react-table-library.
Does this Codesandbox start for you? For me it shows "Installing Dependencies 1/20 (web-vitals)"
from react-table-library.
Hi, could you try this?
https://codesandbox.io/s/jolly-goldwasser-h6y4ue?file=/src/App.js
It requires you to install 2 dependencies.
this is my dependencies page:
PLEASE do install 2 dependencies and help me out!
from react-table-library.
Thanks. It works. Can you give me a scenario of two filters unselected (since all filters are initially selected) where you don't get the expected output?
from react-table-library.
Thanks for the code Robin! I've tried the same today morning but,
The issue i am facing is.. if i select JUST active & mitigated checkboxes, it should return me all the records with this status. But since we are using && between different columns, it requires me to definitely choose one of the options in other columns(Severity, CreationDate and IncidentType)
Could you suggest if there's a way I can get the data displayed with whatever options i choose without having to definitely choose one of the options in each category. (For example, if you uncheck them all and check just active, it should return me all the data with status as active)
from react-table-library.
Sorry for being late here.
The issue is not with the library, but with your booleans. I made the example smaller by removing some of your filters. In the following we have only Incident Types and Status:
The selection shows no results even though you want to show everything, because all Status are selected. The issue is in this code block:
const data = {
nodes: list.filter(
(item) =>
((filters.includes("ACTIVE") && item.Status === "ACTIVE") ||
(filters.includes("MITIGATED") && item.Status === "MITIGATED") ||
(filters.includes("RESOLVED") && item.Status === "RESOLVED")) &&
((filters.includes("CRI") && item.IncidentType === "CustomerReported") ||
(filters.includes("OTHERS") && item.IncidentType === "LiveSite"))
)
};
Which should be:
const data = {
nodes: list.filter(
(item) =>
(filters.includes("ACTIVE") && item.Status === "ACTIVE") ||
(filters.includes("MITIGATED") && item.Status === "MITIGATED") ||
(filters.includes("RESOLVED") && item.Status === "RESOLVED") ||
(filters.includes("CRI") && item.IncidentType === "CustomerReported") ||
(filters.includes("OTHERS") && item.IncidentType === "LiveSite")
)
};
Try it yourself: https://codesandbox.io/s/billowing-wildflower-2gjj35?file=/src/App.js:981-1416
from react-table-library.
Related Issues (20)
- Layout regression introduced in 4.1.0
- How to make several select fields for Table/Cell component?
- Control select/unselect HOT 10
- pass `onInit` callback in `Compact` table
- Issue of Fixed Select Column HOT 1
- Is there any way to support collaborative editing?
- Deleting a column is causing problems on the table HOT 1
- Scroll to selected row HOT 2
- Avoid the table body getting into the table header when scrolling HOT 2
- onToggleAll selects the `disabled` Row as well
- Need of Asana example with Virtualized scroll and fixed header HOT 1
- TypeError: Cannot read properties of undefined (reading 'nodes')
- one-line fix to getting started documentation
- Generated types have broken references
- Bug: "Directory import is not supported"
- TypeError: e.values[t] is undefined
- RTL support for react table library HOT 2
- Pre-Selected Rows? HOT 1
- Error in Jest
- Reverse other columns when sorting
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 react-table-library.