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 Value Should Not Have To Be A String #12018

Open
kevinjavitz opened this issue May 20, 2024 · 0 comments
Open

Select Value Should Not Have To Be A String #12018

kevinjavitz opened this issue May 20, 2024 · 0 comments
Labels
Bug Something is broken and not working as intended in the system. untriaged

Comments

@kevinjavitz
Copy link

Summary

https://polaris.shopify.com/components/selection-and-input/select

Many times the values are from the database as the ID field of a row which is an Int. Why is it forced to be a string?

const driversSelect = drivers.map(driver => ({
label: driver.name,
value: driver.id
}));

has to become:

const driversSelect = drivers.map(driver => ({
label: driver.name,
value: driver.id.toString()
}));

Allow String or Int is my proposed solution

Expected behavior

allow Int

Actual behavior

No response

Steps to reproduce

No response

Are you using React components?

None

Polaris version number

No response

Browser

No response

Device

No response

@kevinjavitz kevinjavitz added Bug Something is broken and not working as intended in the system. untriaged labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system. untriaged
Projects
None yet
Development

No branches or pull requests

1 participant