search action on enter/return

  • 1
  • Question
  • Updated 3 years ago
  • Answered
What's the best way to accomplish this:

The user types in a word or phrase and hits enter...
Then a table below the search bar populates with the results of the search.
(just like google used to work before it could search while you're typing)

Can the search component do this?
Do I have to use a ui-only text field and query models?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Have you simply tried to use the table component,  turn "Load Data" off on the model and exposed the search box (maybe move buttons to the right -- which also moves the search box)   You could also make search not immediately active - which would force user to hit "Go" 

Maybe more straightforward than antciipated.  Or maybe I'm just missing your point. 
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Rob,

That's what I ended up doing. I decided to build a custom table view to make the display of items look the way we wanted, and then I was able to use css to put the search bar at the top center.