PlaceHolder in SearchField

I used search add-on
How can i add placeholder in search:searchField?, like that:
image

Thanks & Reagards

Hello,

What is your Jmix version?

i using version ‘1.5.3’

Current API of SearchField doesn’t allow to setup placeholder.
But you can use the following WA:

  1. Autowire target SearchField to screen controller.
  2. Setup the input prompt e.g. in onBeforeShow event handler:
@Subscribe
public void onBeforeShow(final BeforeShowEvent event) {
    ((SearchFieldImpl)searchField).setInputPrompt("Some text...");
}
1 Like

Thanks for the answer, but How can I override all screen ?

Hello, sorry for the delay.

What do you mean by “override all screen”?

In the context of placeholders - you should setup input prompt for each independent search field.

If you want to extend\override some screen for any purpose - check Extending Functionality :: Jmix Documentation