SearchPane - feedback

SearchPane - feedback

allanallan Posts: 43,525Questions: 1Answers: 5,695 Site admin
edited December 7 in Blog

This thread is for feedback of the SearchPane blog post.

SearchPane is currently "experimental", in the sense that it hasn't been released as a full extension for DataTables and all that entails, as I would like to get some early feedback on the software. Is it useful? What is it missing? I'll maintain a list of requests in this post so we don't end up with too many duplicates.

Regards,
Allan

Feature list

  • Full support for Bootstrap, Foundation, Semantic UI, etc.
  • Server-side processing support (loading data from the server-side)
  • Have the count show two numbers - the first would be how many remain in the filtered set and the second would be how many in the table overall.
  • Ordering of data to match the DataTable
  • Search the search pane!
  • Rebuild API method for selected columns
  • Collapsible container

Replies

  • Loren MaxwellLoren Maxwell Posts: 48Questions: 13Answers: 2

    Allan, just saw the search pane and . . . IT IS AWESOME . . .

    No ideas offhand for additional features, but consider this a definite +1 for offering it as a full extension.

  • Loren MaxwellLoren Maxwell Posts: 48Questions: 13Answers: 2

    Allan, trying this out on a test page but I get an error when the page first comes up (only when I'm using the search pane):
    http://ghsfha.org/w/Special:SeasonHome?view=development&season=1985&org=GHSA&class=AAAA

    Also, do you have an example showing how to specify which columns you'd like to have a search pane for, regardless of the threshold?

    Finally, an idea for a feature (although it's not really a feature per se) is to have the count show two numbers - the first would be how many remain in the filtered set and the second would be how many in the table overall.

    For example, in my table there are 92 teams in Class AAAA and 43 in Region 8, but only 11 at the intersection of Class AAAA and Region 8.

    So when I select AAAA then I might expect to see something like

    11 / 43

    next to 8 in the Region search pane to indicate there are 11 records with the current filter(s) and 43 in the table in whole.

    Anyway, like I mentioned above, an AWESOME plugin!

  • Loren MaxwellLoren Maxwell Posts: 48Questions: 13Answers: 2

    Another quick thought --

    I noticed that when a selection is made on one of the search panes, the selection is highlighted and the table is filtered on that selection.

    However, when no selection is made, then there is no filter applied for that table.

    My suggestion would be that when the search pane initially comes up then all the items are selected (dark blue-ish color) since they all are showing and when one item is selected then the others are actually deselected.

    I think it would make it clearer when the table is being filtered on a specific search pane or not.

    For example, using my table, select Region 8 and then scroll back up to the top of the Region search pane.

    I know it's filtered because of the "X" on the search pane, but at a quick glance the search pane has the same look as the Class search pane where no filter is applied.

    Now if I select Class AAAA, then at a glance I can easily see a Class has been selected but it's not obvious that only Region 8 is selected as well.

  • Loren MaxwellLoren Maxwell Posts: 48Questions: 13Answers: 2

    Also, I use an enum for the Playoffs field. It would be nice if the search pane offered the enum values in the proper order.

    If not too difficult, perhaps the search pane could even offer sorting on the filters that automatically matches the column sorting (i.e., ['desc'] or whatever).

  • garymhgarymh Posts: 3Questions: 1Answers: 0

    I love it! It's perfect for what I need.

    My only request would be a way to set a default filter. For example, I have a column called "membership type" that has the options "Full" and "Associate", but I would like only "Full" selected by default.

  • mattleesmattlees Posts: 1Questions: 0Answers: 0

    Had to sign up to the forums to say this is brilliant!

    Only stumbled across datatables a few months ago and been implementing it across multiple data sources. Been doing some filter with buttons but this is great.

    My only feedback is along the lines of Loren Maxwell in updating the count once you start to filter. eg 12 / 44 records, or the ability to eliminate lines that are no longer an option.

  • rxforcesrxforces Posts: 1Questions: 0Answers: 0

    How does rebuild API work?

    When I made selection on one column, I want to rebuild other columns with filtered data. Is it possible?

  • rduncecbrduncecb Posts: 109Questions: 2Answers: 22

    Very nice indeed, could definitely make immediate use of this and I expect a lot of others could too.
    In regards to additional features, it might be nice if individual column 'panes' can be rebuilt rather than all column filters in the search pane? Perhaps extending the existing API column-selectors to read like:

    table.columns(<column selector>).searchPane().rebuild()
    

    Regardless, love it!

  • gs2589gs2589 Posts: 6Questions: 1Answers: 0

    This is something I've been looking for soooo much!!! Amazing!! Thanks!!

    Some initial thoughts:

    -It would be nice if each filter had a search box, so that when there are many options, a user can quickly filter the filter list to select the desired items to filter (see Google sheets filters for example)

    -It would be nice if there was a way to make the filters collapsible. (again see Google sheets)

    -Lastly, check out these filters here:
    https://airtable.com/universe/expFo1yNQPYwhey5n/vc-fund-database-for-early-stage-startups?explore=true
    Filters like these would be 'killer'

    I played around with your examples, but have not yet implemented it myself. Once I do, I will come back with more feedback.

  • adarshmadrechaadarshmadrecha Posts: 1Questions: 0Answers: 0

    This extension is just awesome.

  • allanallan Posts: 43,525Questions: 1Answers: 5,695 Site admin

    Hi all,

    Thanks for the feedback! Sorry for the delay reply - the forum wasn't highlight new replies in this thread for me (I thought no one had replied!).

    Delighted to hear that this looks like it should be useful. Some fantastic ideas brought up here, which I've added to the list in the first post above.

    In answer to questions:

    @Loren Maxwell Also, do you have an example showing how to specify which columns you'd like to have a search pane for, regardless of the threshold?

    Use the columns option (where ... is column-selector):

    searchPane: {
      columns: ...
    }
    

    My suggestion would be that when the search pane initially comes up then all the items are selected

    That's an interesting point. I'd been looking at it like a filter, nothing selected, nothing to filter, just like the search box. It also makes the performance faster, but I do see the point there. Let's see what others think.

    @garymh My only request would be a way to set a default filter.

    You can do that using the searchCols option - set it to be the value of the items to want to be highlighted.

    @rxforces When I made selection on one column, I want to rebuild other columns with filtered data. Is it possible?

    Not yet - but it goes hand-in-hand with the suggestions above about having two counts when filtering.

    @gs2589 https://airtable.com/universe/expFo1yNQPYwhey5n/vc-fund-database-for-early-stage-startups?explore=true

    That is cool. Thanks for the link. I've actually got something not too dissimilar prototyped :). It needs some polish before it can be published though!

    Regards,
    Allan

  • dclar43dclar43 Posts: 42Questions: 12Answers: 2
    edited December 8

    Have you considered supporting search filters of this type in footer elements?

    In my main use case for DataTables screen real estate is scarce. Quite a while back I wrote a small plug-in that I named Foot Filter, not sure how I feel about that since it invokes the thought of dirty feet.

    Here is a quick example of what it does. Excuse the janky date selector I've been meaning to update it :X. Also in normal usage the select lists don't jump around as much, this demo table just isn't fully setup:
    gif
    webm link for better quality

    It supports what I've needed it to: Select lists, text, numeric, and date ranges.

    I would have released it to the public but it's terribly written and would probably break in every other scenario than my own. Back then I'd not really worked with front end development, jQuery, or DataTables much.

  • allanallan Posts: 43,525Questions: 1Answers: 5,695 Site admin

    I feel that would be a separate plug-in. There is certainly overlap, and it might be that the two should be merged together - there is a lot of scope for improving filtering in DataTables!

    Allan

  • Loren MaxwellLoren Maxwell Posts: 48Questions: 13Answers: 2

    @allan -- Just wanted to follow up on way to select/deselect search pane options.

    The behavior I suggest:
    1) Everything highlighted initially
    2) Clicking an option in one search pane effectively deselects the other options in that pane
    3) Clicking another option in that pane deselects the first option and selects the new one
    4) Multiple options in the same pane can be selected using ctrl-click or shift-click

    is the behavior of the slicer used on pivot tables in Excel, which serves the same purpose as the search pane.

    Some might be familiar with that functionality already.

  • Loren MaxwellLoren Maxwell Posts: 48Questions: 13Answers: 2
    edited December 10

    Allan, not sure if you want just feature requests here for the search pane or some troubleshooting type of stuff, but I have an odd behavior with it on one of my pages:
    http://ghsfha.org/w/Special:SeasonHome

    To duplicate:
    1) Select "GHSA" for the Organization
    2) Select "A" for the Class
    3) Select "AA" for the Class

    I've played around with it and noticed that it seems to include from the lowest selected Class (fewest "A"s) and above when more than one Class is selected.

    I think it may have something to do with the repeating "A"s used for the classification of the teams since I don't get this behavior with any other search pane.

    It also does it on the Class search pane for seasons when we used Class B and Class C designations:
    http://ghsfha.org/w/Special:SeasonHome?view=info&season=1963

    To Duplicate:
    1) Select "GHSA" for the "Organization"
    2) Select "B" for the Class
    3) Select "A" for the Class

    Now Class B and Class A teams show up, but so do Class AA and Class AAA teams although Class C teams don't.

  • hodoninskahodoninska Posts: 7Questions: 1Answers: 0

    This looks like it would be really useful Allan. If the columns.data or columns.render options are being used with a function that returns values in response to a 'filter' request, will these values will be used for this search function?

    How would you cope with the same filter response being returned for rows with a different 'display' value?

    A project that I am working on at present is going to require some advanced search facilities using data that is not displayed in the table. In effect the search will need to be across many child rows when only the parent rows are being displayed. How about providing the ability to fetch the data for a specific search column via an ajax request? The search column might not even be a visible column in the table and for a single row would contain multiple values.

Sign In or Register to comment.