Make "Clear Selection" button appear
I've got a custom Map widget that filters on clicking an area. I want to see the "Clear Selection" button that appears in out-of-the-box widgets so that the user can remove what was selected. I need this feature because we often embed the dashboards in our own applications hiding the filter panel.
Note that the button is not there in the DOM not even hidden, so can't change the CSS because it doesn't exist.
I include a screenshot with the control we want so it's clear.
Thanks.
-
Hi Adei,
For this button to be shown, the widget must be configured to work as a "selector" widget, so make sure your custom widget plugin has the following items in its manifest:
in the manifest's "data" object, a property defining which panels can be used as selectors (usually its just one panel):
selection: ['category']
in the manifest's "options" object, selection is enabled:
selector: true
Please sign in to leave a comment.
Comments
3 comments