Skip to main content
August 31, 2021
Question

how to do disappear search box when click on any where on screen ?

  • August 31, 2021
  • 5 replies
  • 0 views

Team- 

Is there any feasibility to disappear search box if i click on any where on screen white space instead of click  on same search box for hiding.

from below screen i clicked search icon after clicking on search icon below text field is appearing. this is fine for me same way when i click on some white space on screen it should diapered/hide.

 

after it should come to like this.

please suggest me how to do ?

    5 replies

    mikes0011
    Brainy
    August 31, 2021

    Can you clarify what your actual use case is?

    I'm not quite sure I even understand the sequence of events you're describing here... is it that you want a search box to load by default, but hide itself if the user clicks *anything* other than the search box itself?  I don't understand what that would be useful for.

    The Expression Guru
    August 31, 2021

    Hi Schmitt, thanks for reply,

    What I am expecting here is, suppose when page is loads by default all the fields are populating right. So when I go and click search icon the text field is appearing next left side for entering data. This is expected behaviour.

    Now, my concern is some where I clicks on screen in white space by that time search text field should be hide /disappear right.

    Can you pls suggest how to modify to achieve that functionality

    mikes0011
    Brainy
    August 31, 2021

    I would suggest you start with the simplest approach, which is that the search text box will always be shown, either when it's empty and also when a user has entered data (which will continue being shown in it).  In this way a user will be able to see what search term they've already searched on, and/or modify their search as needed.

    The Expression Guru