Table polling event/hook?
Hey, is there a event being emited or a Hook that we can attach some scripts when a table is polling?
The idea is when a new order with status new is present in the table to trigger a audio player sound;
How would that be implemented, I didnt found anything in the documentation in the Advanced Table section?
5 Replies
Someone?
Event with polling I can't see how that would work. I think what you want to do is use notifications or a custom listner to trigger a notification and run a dispatch, and only show the listener to the people you want new orders to be sent too
Event Or Render hook*
When polling does filament go trough all the render hooks again, like that one?
FilamentView::registerRenderHook(
PanelsRenderHook::RESOURCE_PAGES_LIST_RECORDS_TABLE_BEFORE,
fn (): string => view('my::hook-content'),
);
I am not too sure tbh, you can test it. i think it'll call the render, but any JS assigned to the render won't be re-used as the dom wouldn't be re-mounted just filled.
Its possible.
Just find a renderhook that is very close to the table and add
->poll(15)
to the table:
Then you can add another hook to the body to render some static html or js code;