question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot disable multiple on a select field.

See original GitHub issue

Hi, I’m trying to add a select, but it’s always turning into a multiple select even if it’s not what I want.

Pen: http://codepen.io/phiter/pen/PpyNyb

Used JSON for formData:

[
	{
		"type": "select",
		"required": true,
		"label": "Pick one!",
		"className": "form-control",
		"name": "select-1490713532332",
		"multiple": false,
		"values": [
				{
					"label": "ONE",
					"value": "op-1",
	        "selected" : true
				},
				{
					"label": "TWO",
					"value": "op-2"
				},
				{
					"label": "THREE",
					"value": "op-3"
				},
				{
					"label": "FOUR",
					"value": "op-4"
				}
			    ]
		}
]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
phitercommented, Mar 28, 2017

Well, I just found out that I can filter out the nulls when I serialize the object.

But it’s still weird that multiple : false is interpreted as multiple : true.

0reactions
kevinchappellcommented, Mar 28, 2017

@phiterf totally agree.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JQuery : Disable multiple <option> on multiple <select> based ...
When looping all the options, if the option is not the selected one, you need to re-enable it. const $selects = $(".products-combo"); ...
Read more >
disable search on select boxes with multiple selection #4797
Hi everyone, as the title indicates I'm looking for a possibility to disable the search on selects with multiple selection.
Read more >
Row Selection - JavaScript Data Grid
Returns an unsorted list of selected rows (i.e. row data that you ... All remaining rows have disabled checkboxes and cannot be selected...
Read more >
Solved: How to Enable a disabled field when someone select...
Solved: I have a dropdown field and 2 ComboBoxes. ... This would disable the two comboboxes if there is nothing selected in the...
Read more >
Disable Multi-Row Editing for Specific Fields? - DataTables
Is it possible to disable multi-row edit support only for specific fields?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found