List of filter suggestions aside filter input

List of filter suggestions aside filter input

nummer5nummer5 Posts: 9Questions: 3Answers: 0

Link to test case: https://www.unitracc.com/easy-guide/

(No errors; feature question)

Description of problem:

We have a datatables table and like to suggest filter expressions to the visitor, to nudge them to use that filtering feature.
We have implemented a simple select box above the filter input;
whenever the value of that list changes, it is copied to the filter input, and we update the table.
This works flawlessly, so far.

Of course, people can still enter their own arbitrary filter expressions.
And we like the possibility to easily skip through the filter suggestions without leaving that select control.

The question is:

  • Would it be possible to move that list control in the datatables-generated structure, to have it in the same line as the filter field?
  • Would this kind of things e.g. be supported by the buttons extension?
  • Would it be possible and/or considered safe to try to move dom elements around?
  • And finally: If this is not a trivial thing to do -- how many support credits would we talk about?

Thanks!

Answers

  • kthorngrenkthorngren Posts: 21,182Questions: 26Answers: 4,925

    Would it be possible to move that list control in the datatables-generated structure, to have it in the same line as the filter field?

    See if this example helps.

    Would this kind of things e.g. be supported by the buttons extension?

    You can create custom buttons like this example. Is this what you are looking for?

    Would it be possible and/or considered safe to try to move dom elements around?

    Use the dom option to place the Datatables elements where you like.

    And finally: If this is not a trivial thing to do -- how many support credits would we talk about?

    Will let @allan or @colin answer this question :smile:

    Kevin

  • allanallan Posts: 63,230Questions: 1Answers: 10,416 Site admin

    Would this kind of things e.g. be supported by the buttons extension?

    To add to Kevin's point about custom buttons, you can use a collection to get a dropdown list of options.

    And finally: If this is not a trivial thing to do -- how many support credits would we talk about?

    I think Kevin has probably answered all of your questions already :). Or are you looking for us to implement your feature request?

    Allan

This discussion has been closed.