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

fix(react-ui-kit): select types #4353

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix(react-ui-kit): select types #4353

wants to merge 1 commit into from

Conversation

przemvs
Copy link
Contributor

@przemvs przemvs commented Jul 29, 2022

Pull Request Checklist

id: string;
dataUieName: string;
options: Option[];
onChange: (value: Option) => void;
Copy link
Contributor

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?

Copy link
Contributor Author

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 ?

Copy link
Contributor

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

Copy link
Member

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;
Copy link
Contributor

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

Copy link
Contributor Author

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 .

Copy link
Member

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cipher suites need to be a number for the BE to work
Screenshot 2022-07-29 at 13 49 15
Screenshot 2022-07-29 at 13 49 38

Copy link
Member

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

Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cipher suites need to be a number for the BE to work
Screenshot 2022-07-29 at 13 49 15
Screenshot 2022-07-29 at 13 49 38

@CLAassistant
Copy link

CLAassistant commented May 10, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants