Comments (18)
Could you share the data set and options you used? I'll try to recreate this when I get some down time. Maybe post your repo on github if the information is not sensitive ?
from mui-datatables.
The info is sensitive but essentially I'm loading a json file into the program and then looping through each item adding it to the rows, and the columns are also being defined by what's in the json file. It all works, except the filter triangle. When I limit the number of entries from 6k to 15, it works perfectly. An example entry would be:
{
"A": "1",
"B": "9999999999999999",
"SHAPE": "circle",
"LOCATION": "USA",
"C": "xyz",
}
One issue my side is that I'm currently not correctly mapping location column heading to row in the filtering section (so the values are under the right column in the grid, but in the filter, A's values are under B's heading) but that's definitely something wacky on my side. The halting thing that's happening is, I want to only filter by location (as an example) and when I've set all the other filter headings to false, I click the triangle and it just loads forever. When I limit the number of entries to 15, it loads right away (albeit the "locations" are all numbers because A's values are mapping to location, which is my fault)
from mui-datatables.
Ok no problem. I think I can take it from here. I'll follow your structure and beef the data set up to 10,000 rows and look where the issues are. BTW does this happen in any browser you test? Which one are you using to round out this big report
from mui-datatables.
I'm using firefox on linux. I'm really new to react in general, so I'm not sure how helpful I can be though I'll try whatever you suggest
from mui-datatables.
Ah, forgot to mention I am using checkbox... Not dropdown. I think that could be the main issue
from mui-datatables.
Nah you're a huge help honestly this package is fairly new and I'm finally starting to get good big reports now. Having something in the test suite for large data sets is something I should've taken care of earlier so this will be good. I'll still on vacation so I'll try to get to it within next few days when I get some down time.
Thanks again
from mui-datatables.
Idk if I should make a new issue for this, but I'd also like to suggest that in your docs example, you make it as generic as possible. So instead of hard coding in stuff like a user database and column headings, perhaps write a mapping function that takes in a json file with a headings obj list and user db obj list, and then maps the user's data correctly to the heading fields of each created row. This makes your code easy to swap out and makes sense for the kind of use cases the library would work with.
Example:
//read in json file
for (var i = jsonData.colNames.length - 1; i >= 0; i--) {
columns.push({
name:jsonData.colNames[i],
options:{
//wantFilter contains a list of parameters we want to have the filter, also read in from json
filter: wantFilter.indexOf(jsonData.colNames[i]) > -1 ? true:false
}
});
}
That'd do your headings for you, then a mapping function like the one used here could work for rendering the table values correctly maybe
https://codesandbox.io/s/kwyy504y57
(This demo also contains those tick boxes per row people want)
from mui-datatables.
Related to this issue
Alright I've made it so every column appears in the filter section, and that correctly maps the uniques, and gets the correct data under each column (when using dropdown filtering). But if I choose to turn filtering off for certain headings, this misaligns which values go under the remaining headings in the filter. IE, if I leave Amount and Location on as filterable, their values in the dropdowns are correct. If I make Amount not filterable, when I click Location, the values for Amount are being listed. I'd also like to know how to sort the shown values under each heading in the filter box (when I click Location with the correct values showing, they aren't in any order)
from mui-datatables.
Ok, I would open another issue and title it maybe "improve examples documentation + JSON loader function" maybe? I still want to keep the first example a user sees very simple and brief but expanding the examples to show how to load in a JSON file or even creating a standard function to load that in are good suggestions
from mui-datatables.
@JordanKadish ok, I'll roll that into this. As of today there's no sorting in the filter list but it's easy to add so I'll make it an option that is on by default but if a user doesn't want a filter list to be sorted alphabetically then it'll be shown as is.
from mui-datatables.
Anyway, my plane is landing soon I'll look into this next couple of days
from mui-datatables.
Cool, so just to summarise this (I went a bit off track sorry)
Sorting the filter list
Bug (possibly my side only) where hiding a column from the filter section shifts the listed values of all the other columns so heading X now has heading Y's row values
from mui-datatables.
Ok, I just published version 1.0.9. This will sort by default the filter list generated for each column. Also, there was a bug when the filter was turned off and did indeed shift the results. I took care of that bug so thanks for spotting it!
Let me know how it goes
from mui-datatables.
Thanks, I'll get back to you by tomorrow with results
from mui-datatables.
Hey @JordanKadish did you get a chance to try? I've tested again and it seems fine on my end
from mui-datatables.
Yeah thanks, tested and working. Great job! I'm going to be super busy for a while but when I can, I'll try pop up some generic json loader code for you to slot in somewhere
from mui-datatables.
@JordanKadish Thanks for reporting the bug! I'm still going to think about the JSON loader as a main feature. For sure I will include it as an examples/ but as for main feature I still need some time to decide
from mui-datatables.
@gregnb no worries, I just think most people won't be working with this framework on hardcoded data, that's all. I am sure there are multiple ways to load in data, json just seems to be the most common in my experience. Thanks for fixing the bug :)
from mui-datatables.
Related Issues (20)
- how to customize the inbuilt filter function to Cascading Dropdown
- custom filter, removed chip provide wrong `filterPos` when its value is 0 HOT 1
- An option to modify delete icon?
- Pagination Rows per Page resetting itself after clicking on custom button in column HOT 6
- Column Drag not working HOT 3
- in customHeadRender only 1 column needs to sort and not remaining elements HOT 1
- Link on github front page is malicious HOT 1
- Not wroking
- muidatatable scroll bar reset
- Not able to hide expander icon from specific rows
- Why are all the examples broken? HOT 1
- Print only appeared content rows with tableBodyMaxHeight applied
- Twitching while dragging columns
- Bad typing on MUIDataTableOptions renderExpandableRow - rowData
- Responsivenes Stacked not working
- setCellProps and setCellHeaderProps not working in mobile
- Customizing the contents of a chip label
- Cant search data with children having array of objects
- how to filter an date column by month
- States are not updating in customBodyRender
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 mui-datatables.