Topic: No onclose event after clear
sdpollack premium asked 2 years ago
I am using the onclose event on the select component to submit the form after it is closed. I would like to use the clear button, but it does not raise a onclose event. Is there another event I can use to detect when the clear button was pressed?
<select class="form-select select" data-mdb-filter="true" data-mdb-clear-button="true" multiple asp-for="selectedBadges" asp-items="Model.badgeOptions" onclose="this.form.submit()">
</select>
Dawid Wajszczuk staff answered 2 years ago
Hi,
There is no event for this. But you can write your own. Here is the snippet: https://mdbootstrap.com/snippets/standard/d-wajszczuk/3818514.
Keep coding,
Dawid
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Premium
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 3.11.0
- Device: PC
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No