Combine Search and select function in one field

Combine Search and select function in one field

heath22heath22 Posts: 17Questions: 5Answers: 0
edited November 2019 in Free community support

Apologies if this was asked before.
I'm using dataTables for a dataset that has around 5k rows. Searching is trivial here.

Is there a way to combine the search and select function into one?

I basically wonder if I can build uppon this example with the Search API (regex)
but also include the select input search option for each of those fields.

I would then create a sidebar with all these search fields and users would then be able to either type or pull the dropdown to search.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @heath22 ,

    Yep, you could use the elements created in these examples (here and here) in a side-bar. In those examples they're in the table footer, but it would be trivial to move them to another container.

    Cheers,

    Colin

  • heath22heath22 Posts: 17Questions: 5Answers: 0
    edited November 2019

    edit

  • heath22heath22 Posts: 17Questions: 5Answers: 0

    Hi @colin,

    Thanks for your suggestion.
    I did just that but I only see the text input.

    http://live.datatables.net/niniqafe/2/edit

    How do I combine the methods?

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    I'm also seeing both the dropdowns and the input elements in the footer - have you updated the fiddle since posting?

  • heath22heath22 Posts: 17Questions: 5Answers: 0
    edited November 2019

    Hi @colin ,

    I did. I thought it works like jsfiddle and edit 2 shouldn't have been affected.

    Anyway, I do have them both side by side now but I was hoping I can merge/combine them both into one combobox that has a search AND a dropdown.
    I am not able to achieve that.

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    Answer ✓

    This thread shows how to do that.

This discussion has been closed.