@self , @anton , @aleksandra_budnik
It depends on what exactly you mean/will accept by “but what I want is to only let the user input the values from the drop, no arbitrary text allowed”.
If you mean actually prevent user typing anything, then it may require a custom editor like @aleksandra_budnik says.
But if (like me) you are satisfied that the user can type characters — which is just used to match against the available choices — but ultimately can only accept one of the available choices: Then are you aware of:
{
"type": "dropdown",
"allowInvalid": false,
"source": [
"BMW",
"Chrysler",
"Nissan"
]
},
Note the allowInvalid: false
. From my own documentation:
"type": "dropdown"
is equivalent to: "type": "autocomplete"
, "filter": false
, "strict": true
, i.e.dropdown list of choices, typing in leaves all choices available, typing in something not in the list makes the cell invalid. Other options from autocomplete
may be applied: source
for the array of choices, and possibly setting allowInvalid
to false
.
allowInvalid
: Only relevant when strict
is set to true
. Normally, a strict autocomplete
will still allow the entry of a value not among the choices, but the cell will be shown as invalid. Setting allowInvalid
to false
makes it not accept an invalid value at all.
It’s not as nice as not actually letting the user type the characters in the first place, but at least it makes arbitrary text an invalid choice. User is then left in the cell till they pick something legal or abandon & revert.