3

In Hybris Backoffice, when any of the type nodes is selected (e.g. products, customers, etc.) by default the simple search is visible. The user then needs to click on the icon to open the advanced search. There are plenty of examples of how to disable simple search and only show the advanced search widget. However what I need is to just swap the visible state of simple and advanced search, that is:

  • both simple and advanced search enabled
  • by default advanced search is visible
  • on button click, advanced search collapses and simple search is visible

Any pointers are appreciated.

Aleks G
  • 56,435
  • 29
  • 168
  • 265

1 Answers1

1

According with Hybris documentation the Advanced Search Widget can be configured for having as a default the advance search hiding the basic search from the UI using the disable-simple-search configuration attribute:

@disable-simple-search: Disables simple search mode and hides its UI elements. Instead, the advanced search mode is activated automatically.

Otherwise, if it doesn't work, do not set any configuration for the search, and implement a fallback UI configuration strategy which will create a configuration on runtime,dynamically creating the UI configuration based on user demands.

Damian229
  • 482
  • 5
  • 10
  • Thanks. Unfortunately this is not the case. There are two issues witih "disable-simple-search". First, it completely disables simple search and removes it from the screen. I can't get back to it at all. Second, the advanced search block is expanded in a non-scrollable container above the search results. With 7-8 fields in it, there is no space left to see the search results on screen. The more I read/search about it, the more I'm afraid I'll have to extend the search widget and implement my behaviour there. – Aleks G Jun 16 '20 at 14:42