Material-ui: Autocomplete should accept props for title for Buttons

Created on 5 Nov 2019  路  5Comments  路  Source: mui-org/material-ui

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 馃敠

Autocomplete enhancement

All 5 comments

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

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

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

@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 馃?~

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TimoRuetten picture TimoRuetten  路  3Comments

newoga picture newoga  路  3Comments

mb-copart picture mb-copart  路  3Comments

ghost picture ghost  路  3Comments

revskill10 picture revskill10  路  3Comments