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

setValue(0) does not seem to work #280

Open
abenhamdine opened this issue Sep 7, 2023 · 1 comment
Open

setValue(0) does not seem to work #280

abenhamdine opened this issue Sep 7, 2023 · 1 comment

Comments

@abenhamdine
Copy link
Contributor

Hi,

I have a select with the following options (simplified example) :

var options = [
  { label: 'Options 1', value: 0 },
  { label: 'Options 2', value: 1 },
  { label: 'Options 3', value: 2 },
];

select.setValue(0) does nothing : no option is selected, the combo remains empty
select.setValue(1) or select.setValue(2) works fine of course as expected

@gnbm
Copy link
Collaborator

gnbm commented Sep 22, 2023

I believe the 0 is considered the "null" value, ie. the value corresponding to the scenario where no selection was made yet.
Have you tested this together with the property "emptyValue"? Not sure if it would work since I didn't have time to test it.
cc: @sa-si-dev

@gnbm gnbm added invalid This doesn't seem right and removed invalid This doesn't seem right labels Dec 22, 2023
@gnbm gnbm removed the invalid This doesn't seem right label Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants