Changing Blanks to all using select filtering.

Changing Blanks to all using select filtering.

PlayabilityPlayability Posts: 2Questions: 1Answers: 0

I'm looking at https://datatables.net/examples/api/multi_filter_select.html and it strikes me it would be more intuitive to have the default selection option to say ALL instead of being blank. How would one achieve that?

Answers

  • mRendermRender Posts: 151Questions: 26Answers: 13
    table.column( i ).data().unique().sort().each( function ( d, j ) {
                select.append( '<option value="'+d+'">'+d+'</option>' )
    

    I'm not sure if this would work but it might say ALL:

    <option value="'ALL'">'ALL'</option>
    
  • PlayabilityPlayability Posts: 2Questions: 1Answers: 0

    No I couldn't make that work. Mind you the multi filter select example is flawed anyway - once a selection has been made, setting it back to nothing does not restore the full table.

This discussion has been closed.