It is possible to set a wpTable to autorefresh, But I want to trigger the same refresh in javascript. But how? I guess there are a method to call somewhere, that also is called by autorefresh. But I can not find it.
This wpDataTable is on a tab in a divi-theme. My goal is to refresh the wpTable when that tab is showed, so that the table shows with fresh data.
The subject could be updated to "How to trigger manual refresh of wpDataTable" if you prefer. Because that is what I want to know. Some javascript to call to trigger a refresh, reload or what you want to call it.
- Auto-refresh feature for the tables, using the built-in functionality of our plugin is only possible for server-side enabled tables, such as a manual table, or a server-side SQL query-based table.
This option will appear on the "Data source" tab above the table.
You can add the interval (in seconds) after which the table will refresh itself, thus displaying any changes that happened in that time period.
-
2.
- But for tables linked to a data source - you will not be able to enable server-side processing, and this requires a custom JQuery solution.
Unfortunately, we don't have any built-in solution for that at this time.
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
-
If you need a solution for it now, maybe it can be done with a high level of custom work, but I am not sure, to be honest. Our developers are very busy at the moment, working on some priority tasks and fixing bugs and issues with our plugins, so they won't be having the time for custom work in the near future.
We can recommend reaching out to someone who does custom solutions, such as WP Kraken, but we can't advise on their pricing.
-
I can only share an idea for a custom workaround which one of our users came up with.
( we can't guarantee that it works, but the user claims it worked for him)
This is what he said :
"Create a filter. Make sure that you choose "above the table". it is because we'll need the filter id for this trick.
jQuery("#filterBox_table_5").hide();
//if you don't want to see this filter, check your table id and use it here.
jQuery("input[placeholder='YOUR FIELD NAME']").trigger('keyup');
// this refresh your table.
Call this jQuery line each time you want to refresh it. "
- I hope that this can help, to at least give you an idea for a workaround.
Of course, you can always research resources such as Stack Overflow, and similar,
or you can reach out to WP Kraken to ask them if they could create a solution, but as we said, we can't advise on their pricing.
I actually saw some of the suggested pieces before posting this, but was hoping for something easier by now. I do think there should be a mechanism to call to do a reload of the table manually. Why not a button in the table-tools itself?
To make it work, you will need to activate filtering above the table and at least one column for filtering.
It will hook an onclick-event to the link that is heading for the tab where the wpDataTable is. That function will call the other function that triggers a keyup on the filter editbox. Last line will hide the filterbox all together. It has nothing to do with the first code. But that filterbox is required since it is what is triggered the keyup on.
I placed the above code in a divi code element below the tabs element. the code above needs to be placed within a script tag for that to work.
Hi.
It is possible to set a wpTable to autorefresh, But I want to trigger the same refresh in javascript. But how? I guess there are a method to call somewhere, that also is called by autorefresh. But I can not find it.
This wpDataTable is on a tab in a divi-theme. My goal is to refresh the wpTable when that tab is showed, so that the table shows with fresh data.
Thank you in advance for any help.
Hi again
The subject could be updated to "How to trigger manual refresh of wpDataTable" if you prefer. Because that is what I want to know. Some javascript to call to trigger a refresh, reload or what you want to call it.
Hope someone know some solution.
Regards
Mattias
Hi, Mattias
Sorry for a late reply.
-
- Auto-refresh feature for the tables, using the built-in functionality of our plugin is only possible for server-side enabled tables, such as a manual table, or a server-side SQL query-based table.
This option will appear on the "Data source" tab above the table.
You can add the interval (in seconds) after which the table will refresh itself, thus displaying any changes that happened in that time period.
-
2.
- But for tables linked to a data source - you will not be able to enable server-side processing, and this requires a custom JQuery solution.
Unfortunately, we don't have any built-in solution for that at this time.
Please feel free to search on our suggestions page,
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
-
If you need a solution for it now, maybe it can be done with a high level of custom work, but I am not sure, to be honest. Our developers are very busy at the moment, working on some priority tasks and fixing bugs and issues with our plugins, so they won't be having the time for custom work in the near future.
We can recommend reaching out to someone who does custom solutions, such as WP Kraken, but we can't advise on their pricing.
-
I can only share an idea for a custom workaround which one of our users came up with.
( we can't guarantee that it works, but the user claims it worked for him)
This is what he said :
"Create a filter. Make sure that you choose "above the table". it is because we'll need the filter id for this trick.
jQuery("#filterBox_table_5").hide();
//if you don't want to see this filter, check your table id and use it here.
jQuery("input[placeholder='YOUR FIELD NAME']").trigger('keyup');
// this refresh your table.
Call this jQuery line each time you want to refresh it. "
- I hope that this can help, to at least give you an idea for a workaround.
Of course, you can always research resources such as Stack Overflow, and similar,
or you can reach out to WP Kraken to ask them if they could create a solution, but as we said, we can't advise on their pricing.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Now it is solved :-)
I actually saw some of the suggested pieces before posting this, but was hoping for something easier by now. I do think there should be a mechanism to call to do a reload of the table manually. Why not a button in the table-tools itself?
To make it work, you will need to activate filtering above the table and at least one column for filtering.
This is the code that does it:
It will hook an onclick-event to the link that is heading for the tab where the wpDataTable is. That function will call the other function that triggers a keyup on the filter editbox. Last line will hide the filterbox all together. It has nothing to do with the first code. But that filterbox is required since it is what is triggered the keyup on.
I placed the above code in a divi code element below the tabs element. the code above needs to be placed within a script tag for that to work.
Hi, Mattias
Thank you very much for sharing your solution with us.
i think the suggestion to add a button in the table tools for a possible auto refresh solution
is a good idea for future improvements.
If you can be so kind, add this suggestion here for our developers and they will do their best to add that in the future.
-
We will make note of this solution, i am sure it will be helpful for other users,
thank you again for that.
Of course, please let u know if there is anything else we can help with.
Have a great day!
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables