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

Dropdown option id gets transformed from number to string #116

Open
tb-viktor opened this issue Apr 11, 2022 · 0 comments
Open

Dropdown option id gets transformed from number to string #116

tb-viktor opened this issue Apr 11, 2022 · 0 comments

Comments

@tb-viktor
Copy link

Hello,

We have an issue in jspreadsheet where the dropdown option ids get transformed to strings and result in selections being invalid. After contacting support we have been directed here to make a feature request.

We allow the user to configure the values of their dropdown, which in this case are numeric ids and string names.

We pass the options in such a format:

[
  { id: 1, name: "Fruits" },
  { id: 2, name: "Legumes" },
  { id: 3, name: "General Food" }
]

After that if we select an option and try to read the value, it becomes e.g '1' instead of 1 and causes an option not found state.

There is a reproduction link here:

https://codesandbox.io/s/online-spreadsheet-with-react-and-jss-forked-e5sbwz?file=/src/App.js

Opening the console there and selecting a value will show the problem.

Is it possible to return the same value that is passed to the library?

@tb-viktor tb-viktor changed the title Dropdown option id gets transformed from number to integer Dropdown option id gets transformed from number to string Dec 6, 2023
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

1 participant