-
Notifications
You must be signed in to change notification settings - Fork 5
feat(design-system): add autocomplete [AR-38986] #108
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
base: main
Are you sure you want to change the base?
feat(design-system): add autocomplete [AR-38986] #108
Conversation
packages/design-system/src/components/ds-avatar-group/ds-avatar-group.module.scss
Show resolved
Hide resolved
packages/design-system/src/components/ds-autocomplete/ds-autocomplete.types.tsx
Outdated
Show resolved
Hide resolved
| /** | ||
| * Label to display in the autocomplete dropdown | ||
| */ | ||
| label: 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.
Do we want to allow to pass ReactNode? Fallback for some fancy design
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 is no requirement for it
it will require custom handling and inceasing scope of work for implementation
| /** | ||
| * Value to return when the option is selected | ||
| */ | ||
| 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.
string feels too limited. Very often even specific object type can be a value.
I try would go with some generic type, it should work, right?
type DefaultValue = string | number;
export interface DsAutocompleteOption <T = DefaultValue> {
//...
What do you think? 🤔
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.
I would prefer to stay with current simple implementation and delegate data preparation logic to component consumer
No description provided.