Allow users of ToasterTable to manually trigger a refresh of the data. This can be useful if an action has happened in-page and the data is now invalid. Such as new data being added or removed from the model.
Signed-off-by: Michael Wood <[email protected]> --- bitbake/lib/toaster/toastergui/static/js/table.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index c69c205..f587788 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -454,6 +454,13 @@ function tableInit(ctx){ }); } + /* Allow pages to trigger reload event */ + table.on('reload', function(e, newTableParams){ + if (newTableParams) + loadData(newTableParams); + else + loadData(tableParams) + }); $(".get-help").tooltip({container:'body', html:true, delay:{show:300}}); -- 2.1.4 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
