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: Type improvements #206

Open
jamcry opened this issue Nov 3, 2022 · 0 comments
Open

Select: Type improvements #206

jamcry opened this issue Nov 3, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request W.I.P Work in progress

Comments

@jamcry
Copy link
Collaborator

jamcry commented Nov 3, 2022

  • If we are not already exporting the new types from index, we should export them, like we do for other component types

  • Previously, DropdownOption was generic, so we were able to type its Id and Context, like this: DropdownOption<UserType>. But with Select changes, we lost this feature.

    Before:

    export interface DropdownOption<Id = string, Context = any> {
      id: Id;
      title: string;
      customClassName?: string;
      CustomContent?: JSX.Element;
      icon?: React.ReactNode;
      subtitle?: string;
      context?: Context;
      isDisabled?: boolean;
    }

    Now:

    interface Option {
      id: string;
      isDisabled?: boolean;
    }

    We should try to restore this.

@jamcry jamcry added ready for review enhancement New feature or request and removed ready for review labels Nov 3, 2022
@jamcry jamcry changed the title Select: Make Option type generic Select: Type improvements Nov 7, 2022
@gulcinuras gulcinuras self-assigned this Nov 16, 2022
@gulcinuras gulcinuras linked a pull request Nov 28, 2022 that will close this issue
@jamcry jamcry added the W.I.P Work in progress label Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request W.I.P Work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants