Plugin Schema with multiple selection? #112
Replies: 2 comments
-
The plugin config editor uses https://www.npmjs.com/package/react-jsonschema-form-bs4. It is a bit old version, but I don't think even newer React JSON Schema Form has support for proper multiselect out of the box. You can check things out for the latest version at https://rjsf-team.github.io/react-jsonschema-form/ - there is one multiselect example, but that is not very usable, as multiple selections require command/control clicking the choices to select multiple ![]() How many choices do you have? Wouldn't simple checkboxes work, easy enough to select multiple, unless the list of choices is long. Another option would be an array or enums. Then the user could add the ones they want to the list. It would work, but be a little clunky. Yet one more option is custom configuration editor, like the calibration plugin has. Then you are free to do whatever you want, like use react-select for multiple selections, like the latest version of server uses for debug key activation in Server Log. |
Beta Was this translation helpful? Give feedback.
-
No, the calibration plugin is very tricky. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to create a JSON Schema which is displayed in the plugin's configuration screen in the Admin UI as
<select multiple>
?So,
{ "enum": [...]}
displayed as<select>
. I want<select multiple>
.Beta Was this translation helpful? Give feedback.
All reactions