Skip to content

Conversation

@vpolessky-dn
Copy link
Collaborator

No description provided.

/**
* Label to display in the autocomplete dropdown
*/
label: string;
Copy link
Collaborator

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

Copy link
Collaborator Author

@vpolessky-dn vpolessky-dn Jan 27, 2026

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

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? 🤔

Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants