-
Notifications
You must be signed in to change notification settings - Fork 743
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 no empty message if forceSelection is false or introduce a new attribute showEmptyMessage #11831
Comments
@pizzi80 can you be a little more clear on your scenario? Maybe a reproducer showing the issue. |
if the user is not forced to select an item from the suggested list of values If you type something in the first input in the autocomple showcase, https://www.primefaces.org/showcase/ui/input/autoComplete.xhtml?jfwid=d1c1b |
I've found that if you set the emptyMessage is not displayed |
only as a reminder ... the https://primefaces.github.io/primefaces/13_0_0/#/components/autocomplete?id=autocomplete |
Yep i was going to say that but in PF14 this will be different as we removed the EmptyMesage property as labels got moved to the client side from the server side. So in 14 this would be either MonkeyPatch: if (PrimeFaces.widget.AutoComplete) {
PrimeFaces.widget.AutoComplete.prototype.configureLocale = function() {
this.emptyMessage = '';
this.resultsMessage = PrimeFaces.getLocaleLabel('searchMessage');
if (this.dropdown) {
this.dropdown.attr('aria-label', PrimeFaces.getLocaleLabel('choose'));
}
}
}; Or change your local to have an empty search label |
i think for 14.0 we need to add |
probably it's better, in this way you'll cover all the situations ;) |
Description
Solution 1:
do not show the emptyMessage if
forceSelection="false"
Solution 2:
introduce a new attribute
showEmptyMessage
Describe the solution you would like
If the selection of a suggested element is not mandatory,
and there are no result from the
completeMethod
,usually I'm just writing a new value and
I'm not interested if the are no suggested values...
Additional context
No response
The text was updated successfully, but these errors were encountered: