empty cell example question

empty cell example question

zmh021810zmh021810 Posts: 6Questions: 3Answers: 0

in the example of the empty cell:
datatables.net/extensions/searchpanes/examples/advanced/emptyCells.html

why there are no filter for name, start date **and **salary?

I get confused for that

This question has an accepted answers - jump to answer

Answers

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @zmh021810 ,

    searchPanes makes use of a searchPanes.threshold to decide if it should show panes or not, you can read more about it there. This is only in place if the panes are not forced to show using columns.searchPanes.show.

    To summarise, SearchPanes calculates a ratio of the number of distinct values in a column to the total number of values in the column. The panes show depending on if the ratio is above or below this value.

    Thanks,
    Sandy

  • zmh021810zmh021810 Posts: 6Questions: 3Answers: 0

    Hi, @sandy

    Thanks a lot for your help, so in order to show every column, I should change the code of SearchPanes to make a very small ratio, am I right?

  • zmh021810zmh021810 Posts: 6Questions: 3Answers: 0

    Hi, @sandy

    Sorry, just tested, should be a large number, such as 1.

    BTW, do u know how to decrease the size of the panes? now it is too wide, u can see my attached pictures.

  • sandysandy Posts: 913Questions: 0Answers: 236
    Answer ✓

    Hi @zmh021810 ,

    To force the panes to show I would make use of columns.searchPanes.show it's definitely the cleaner way to do it. Take a look at this example. It is also possible to set the threshold, but I prefer to use the columns route!

    As for changing the width, SearchPanes has a responsive side to it so that it will adjust itself depending on the size of the container it is given. You could force the width using some custom css. There is also the searchPanes.layout option which allows you to set how many columns the SearchPanes will appear in. To be sure which one will work best for you I'll need to see a test case please. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Thanks,
    Sandy

This discussion has been closed.