Giter Site home page Giter Site logo

Comments (7)

melloware avatar melloware commented on June 20, 2024 1

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 this.emptyMessage = PrimeFaces.getLocaleLabel('emptySearchMessage');

from primefaces.

melloware avatar melloware commented on June 20, 2024 1

i think for 14.0 we need to add showEmptyMessage like PrimeReact has https://primereact.org/autocomplete/#api.AutoComplete.props.showEmptyMessage

from primefaces.

melloware avatar melloware commented on June 20, 2024

@pizzi80 can you be a little more clear on your scenario? Maybe a reproducer showing the issue.
PrimeFaces Test

from primefaces.

pizzi80 avatar pizzi80 commented on June 20, 2024

if the user is not forced to select an item from the suggested list of values
the empty message only brings confusion, for example

If you type something in the first input in the autocomple showcase,
the emptyMessage it's not what an user expect ...

https://www.primefaces.org/showcase/ui/input/autoComplete.xhtml?jfwid=d1c1b

Schermata del 2024-04-29 17-18-27

from primefaces.

pizzi80 avatar pizzi80 commented on June 20, 2024

I've found that if you set
emptyMessage="#{null}" or emptyMessage=""

the emptyMessage is not displayed

from primefaces.

pizzi80 avatar pizzi80 commented on June 20, 2024

only as a reminder ... the emptyMessage attribute it's not documented at all

https://primefaces.github.io/primefaces/13_0_0/#/components/autocomplete?id=autocomplete

from primefaces.

pizzi80 avatar pizzi80 commented on June 20, 2024

probably it's better, in this way you'll cover all the situations ;)

from primefaces.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.