Topic: Select - reset
adlib pro asked 5 years ago
Hello, dear MDB team!
It's about button of type="reset" and .mdb-select
Expected behavior:1. I choose an option from select drop down menu, for example: First option2. After pressing of "Reset Button" - I'm expecting to see "disabled selected" loaded.
Actual behavior:1. I choose an option from select drop down menu, for example: First option2. After pressing of "Reset Button" - the select option (content) is empty.
Resources: ( edited: removed link )
Best regards!
MDBootstrap staff answered 5 years ago
Hi adlib,
I forked from your snippet and created a working example with this functionality: https://mdbootstrap.com/snippets/jquery/pjoter-2-0/1217004
If you need additional help I am here for you.
Best Regards, Piotr
adlib pro commented 5 years ago
Hello, Piotr! I would like to apologize for my late answer! (What can I say - time runs quickly) Now, straight to the point - Yes, you did a great job! That is exactly what I was looking for! I would like to thank you for your professional support!
P.S.: For the purpose of floating input field - when is pressed the Reset button - I added yet another line of code:
$('#sorting-row > div > form > div > div:nth-child(4) > fieldset > div > label').removeClass('active');
Best regards!
MDBootstrap staff commented 5 years ago
Perfect, I am glad it helped you. Have a nice day!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.8.10
- Device: All
- Browser: All
- OS: Windows 10
- Provided sample code: No
- Provided link: No
MDBootstrap staff commented 5 years ago
Hi adlib, can you please create a snippet with your code instead of this raw data?If I use your code in our environement I get these results: https://mdbootstrap.com/snippets/jquery/pjoter-2-0/1200309I understand that there might be an issue but I need to address the case in which it occurs.
Best Regards, Piotr
adlib pro commented 5 years ago
Hi, Piotr! Thanks for your proposal about creating a snippet. As I see now, there is such an option.
https://mdbootstrap.com/snippets/jquery/adlib/1206082
When is pressed the Reset Button (the first one from the right) - I expect to see the default option in the select form.
Best Regards!