Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select doesn't work when wrapped in Label #494

Open
gleblebedev opened this issue Aug 6, 2023 · 1 comment
Open

Select doesn't work when wrapped in Label #494

gleblebedev opened this issue Aug 6, 2023 · 1 comment
Labels
bug Something isn't working data binding

Comments

@gleblebedev
Copy link
Contributor

Documentation says:

A target element can be specified by providing an ID in the for attribute. Otherwise, when omitted, the label will target the first descending element which has one of the following tags: <button>, <input>, <textarea>, <progress>, or <select>.

But when select is wrapped in label the value doesn't change:

<label>
some label
	<select data-value="select_value">
		<option value="0">0</option>
		<option value="1">1</option>
		<option value="2">2</option>
		<option value="3">3</option>
	</select>
<label>

I've tried to debug and it seems that WidgetDropDown::ProcessEvent doesn't get callback on selected element.

@mikke89 mikke89 added bug Something isn't working data binding labels Aug 6, 2023
@mikke89
Copy link
Owner

mikke89 commented Aug 6, 2023

Thanks for reporting the issue. I can reproduce it on my end. Indeed, looks like label for works fine, but not wrapping the select element in the label. I can change the value externally, but not when interacting with the element itself. It seems to work fine without data bindings. I'll take a closer look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data binding
Projects
None yet
Development

No branches or pull requests

2 participants