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

Autocomplete should accept props for title for Buttons #18202

Closed
1 task
VipinJoshi opened this issue Nov 5, 2019 · 5 comments · Fixed by #18219
Closed
1 task

Autocomplete should accept props for title for Buttons #18202

VipinJoshi opened this issue Nov 5, 2019 · 5 comments · Fixed by #18219
Assignees
Labels
component: autocomplete This is the name of the generic UI component, not the React module! new feature New feature or request

Comments

@VipinJoshi
Copy link

Hi,
Thank you for making developer life easy.
While using AutoComplete I noticed that we have some hardcoded value when we hover on an open list button like "Open popup", "Close popup", "Clear". the component should accept props for these values.

  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

Examples 🌈

Motivation 🔦

@oliviertassinari oliviertassinari added new feature New feature or request good first issue Great for first contributions. Enable to learn the contribution process. component: autocomplete This is the name of the generic UI component, not the React module! labels Nov 5, 2019
@oliviertassinari
Copy link
Member

@VipinJoshi I agree, thank you for the report. Do you have a specific API to propose? I'm not aware of a similar case in the repository. Maybe a titles object prop?

@VipinJoshi
Copy link
Author

VipinJoshi commented Nov 5, 2019

@oliviertassinari yeah something like
titles ={openPopup:"your message", closePopup:"",clearPopup:"
" }

@m4theushw
Copy link
Member

IMHO, I think it would be better to create props like openPopupTitle and closePopupTitle. This way we can set default values when destructuring.

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 5, 2019

@m4theushw The advantage of the single prop is that it prevents default values. Should we assume that the main use case is internationalization? In which case, by order of preference 1. the right wording > 2. no wording > 3. wording in a different language 🤔?

@m4theushw
Copy link
Member

@oliviertassinari Thinking this way you're right. Is weird to show a title in a different language. My point in creating multiple props was to not create another interface in Autocomplete.d.ts to just enforce the shape of the titles prop. Now I agree with the titles approach.

@oliviertassinari oliviertassinari removed the good first issue Great for first contributions. Enable to learn the contribution process. label Nov 9, 2019
@oliviertassinari oliviertassinari self-assigned this Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants