Manol Posted July 8, 2017 Posted July 8, 2017 Hello forum. I've about 10000 vehicles to filter in a table in the frontend with about 10 fields, c3, title, image, km, date, axes, url ... in the past I did something similar with angular but probably there are to many items to filter with this technology. It will be a kind of excel table with filters. What do you think? is it better to filter them in php with pw api or angular would be better, any other ideas? Thanks.
kixe Posted July 8, 2017 Posted July 8, 2017 Try lazyload: $pages->findMany(); https://processwire.com/api/ref/pages/find-many/ 1
Robin S Posted July 8, 2017 Posted July 8, 2017 Surely you don't want/need all 10000 items in the table at once. You could emulate the way that Lister works. A paginated table where the filter/sort options use AJAX requests and then PW selectors on the server side.
bernhard Posted July 8, 2017 Posted July 8, 2017 you could do that quite easily using jquery datatables: https://datatables.net/extensions/scroller/examples/initialisation/large_js_source.html in the example they have 50.000 records without a problem. i'm working on a new datatables fieldtype right now. do you need it for the front or backend? maybe you can get some inspiration here, but be advised that i'm working on a new version (fieldtype similar to my handsontable fieldtype) and this module will change completely edit: of course server-side would be better and client-side depends on the clients machine. so if you have special requirements that could or could not be a good way to go... 2
Manol Posted July 8, 2017 Author Posted July 8, 2017 4 hours ago, bernhard said: you could do that quite easily using jquery datatables: https://datatables.net/extensions/scroller/examples/initialisation/large_js_source.html in the example they have 50.000 records without a problem. i'm working on a new datatables fieldtype right now. do you need it for the front or backend? maybe you can get some inspiration here, but be advised that i'm working on a new version (fieldtype similar to my handsontable fieldtype) and this module will change completely edit: of course server-side would be better and client-side depends on the clients machine. so if you have special requirements that could or could not be a good way to go... That look very promising I'll give it a try 1
szabesz Posted July 8, 2017 Posted July 8, 2017 I was also thinking of using DataTables(.net), but paying for the editor is not something I'm after, so I looked for alternatives and found this one: http://w2ui.com/web/demos/#!grid/grid-21 W2UI is quite feature rich, besides using its Grid I will also use the other UI elements such us Layout, Form, Field, etc... Ajax will be needed to wire them up, of course. First time I'm building something like this, it will be quite an adventure, I'm sure
bernhard Posted July 8, 2017 Posted July 8, 2017 datatables is free & open source: https://datatables.net/faqs/index#Licensing if you plan to use it you might be happy to hear that i'm working on a new fieldtype that works similar (but even better) than my handsontable fieldtype edit: sorry, seems you are only talking about the editor. i used datatables a lot with custom action icons opening pw-panels and regular pw-edit screens. works like a charm! 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now