Feature Request: limit individual searchPanes sizes

Feature Request: limit individual searchPanes sizes

tacman1123tacman1123 Posts: 198Questions: 46Answers: 1

I'd like to be able to control the height of the searchPanes components.

https://dt-demo.survos.com/congress/api_grid

Since gender, house (and party, not seen) are limited to a list of known sizes, I'd like to set the maxItems accordingly.

There's a lot of whitespace on the left for gender and house, and the longer state list is relegated to the same amount of space.

I love searchPanes, it's an amazing tool for browsing data.

Replies

  • allanallan Posts: 62,990Questions: 1Answers: 10,367 Site admin

    You could set the scrollCollapse option for the SearchPane DataTables.

    Use searchPanes.dtOpts to set the options to pass to the pane DataTables.

    Allan

  • colincolin Posts: 15,236Questions: 1Answers: 2,598
    edited December 2023

    Here's the suggestion in action - you'll notice the Office pane is shorter than the others as it's compressed up.

    The relevant code to do that, is:

        columnDefs: [{
          targets: ['_all'],
          searchPanes: {
            dtOpts: {
              scrollCollapse: true,
            }
          }
        }]
    

    Colin

  • tacman1123tacman1123 Posts: 198Questions: 46Answers: 1

    Very cool, thanks! This looks much better now: https://dt-demo.survos.com/congress/api_grid?gender=M&house=sen

    Tiny css issue, the scrollbars don't seem to be necessary if the items all fit in a pane. Is there something I can do about that? A css tweak, or maybe I'm missing a css file?

Sign In or Register to comment.