Search without the search box

Search without the search box

nyknyk Posts: 18Questions: 0Answers: 0
edited September 2011 in Feature requests
I'm using data tables because the HTML select box is really limited(at least for being used as a table), but the thing I miss is being able to click an object on the select box and just type and it'll take me to the result(Press P and it will being my to the first entry that starts with P).

Is there a way to have the filter react when the data table has focus and typing occurs, instead of having to use the search box? I know this sounds lazy but I wanted to see if it was feasible or already exists...

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    I believe if you set keyup/keydown/keypress events on the container holding your datatables (could be a div or even the body) that the keypresses will bubble down to trigger the events.

    you can feed the keys to fnFilter
  • nyknyk Posts: 18Questions: 0Answers: 0
    For those who stumble upon this and wonder... I got it working. I added a .attr('tabindex', '0') to the table so that it would be focusable then added a focus to the search box on a keydown event.
This discussion has been closed.