I'm using a hack-type plugin to run some DOM manipulations on a dashboard's filters to add additional functionality. I have it setup the following way:
uiModules
.get('kibana')
.run(Private => {
const filterBar = Private(FilterBarQueryFilterProvider);
filters = filterBar.getFilters()
});
The issue I have is that at first filters
is empty as it's being ran before the filters are ready. I've tried using jQuery's $(document).ready
function but that didn't help.
Is there a way to wait for the filters to be fully loaded on a dashboard before I can run code in run
method?
Thanks!