Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Table Editor - Select in Modal Returns No Value

gshell free asked 3 years ago


I have a modal for creating and editing in the Table Editor. When I click the save button, the first value from the select field does not appear in the row for the new entry. The remaining options for the select field do show as expected when saving, only the first option does not save. I found that the issue is that I do not have a default value defined, which I do not see listed as being a required value in the documentation. Only the options are documented as being required.

Expected behavior All values from select field in modal appears as value in row upon save.

Actual behavior First value from select field in modal does not appear as value in row upon save.

Resources (screenshots, code snippets etc.) I took the code snippet from the Modal part of the Table Editor documentation and removed the option for the default value. I was able to replicate the problem without any other changes: https://mdbootstrap.com/snippets/standard/gshell/2616048


Dawid Wajszczuk staff commented 3 years ago

Hi. I'm unable to open your snippet (it is just empty). Can you check it or create a new one? Maybe you forgot to click publish or there was some error.


gshell free commented 3 years ago

This time I clicked the Publish button so hopefully it saved: https://mdbootstrap.com/snippets/standard/gshell/3317463#js-tab-view


Dawid Wajszczuk staff answered 3 years ago


Hi,

This time snippet has worked. We have discussed this in team and we strongly advise to use defaultValue. We will add proper note to our documentation. If for whatever reason you don't want to use it, you can try adding first option as blank (without any value). Here is the snippet https://mdbootstrap.com/snippets/standard/d-wajszczuk/3321868.

Keep coding,
Dawid



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: Laptop
  • Browser: Chrome
  • OS: Windows 10 and 11
  • Provided sample code: No
  • Provided link: Yes