-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix(react-ui-kit): select types #4353
base: main
Are you sure you want to change the base?
Conversation
id: string; | ||
dataUieName: string; | ||
options: Option[]; | ||
onChange: (value: Option) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the value Option[]
when select is IsMulti
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will have always single option on change click, if you can check it on MLS using this: https://wearezeta.atlassian.net/wiki/spaces/WEB/pages/567214882/Updating+dependencies+packages+in+development+Yalc ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is incorrect from my testing.. for multi select it passes all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's what I assumed as well when talking to @przemvs
@@ -31,16 +31,17 @@ import type {Theme} from '../Layout'; | |||
import InputLabel from './InputLabel'; | |||
|
|||
export type Option = { | |||
value: string | number; | |||
value: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the value will sometimes be a number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but you can replace this value from string to number :) I talked about this with @aweiss-dev .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in what case do we return a number? when we talk about inputs the input value will always be a string. unless the input event value gets manipulated before reaching the onChange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that gets done from the onChange handler right? The option and the onChange on the select are supposed to work with strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry i missed this mesage but yea thats fine also
@@ -31,16 +31,17 @@ import type {Theme} from '../Layout'; | |||
import InputLabel from './InputLabel'; | |||
|
|||
export type Option = { | |||
value: string | number; | |||
value: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Checklist