appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
33.82k stars 3.64k forks source link

[Bug]: No error thrown if the Default Value is not present in the options #16870

Open shadabbuchh opened 1 year ago

shadabbuchh commented 1 year ago

Is there an existing issue for this?

Description

No error is thrown when a Default value is set such that it is not present in the options for a TreeSelect & MultiTreeSelect & Multiselect widgets.

https://www.loom.com/share/ad554e5157dc44af9a35e14fe3b42db5

Steps To Reproduce

  1. D&D a TreeSelect or MultiTreeSelect widget.
  2. Set a Default Value such that it is not present in the options list of the widget.

Expected: An error should be thrown, like the one we see for Select or MultiSelect widgets.

Public Sample App

No response

Version

Cloud

saicharan-zemoso commented 2 months ago

Hello @somangshu @dilippitchika @Aishwarya-U-R , can I work on this issue? I will post my approach as comment once I come up with a solution.

saicharan-zemoso commented 1 month ago

Hello @somangshu @Aishwarya-U-R @shadabbuchh , let me conform if i am right, the expected solution is to add this label below the default selected field right: image

Because there is no error thrown or any warning is showed even for select and multi select widgets. It just has that label for that field in the select and multi select widgets.