condition on a select ?

condition on a select ?

SWATswatSWATswat Posts: 109Questions: 0Answers: 0

Hello Is it possible to set a condition on a select ?
Explanation:
I have a list of actions to do in an EDITOR datatables table, I assign each action to a user (thanks to select).
I display in the table the totality of the action lines for all the users (active and not active).
I would like to display only the active users in the select.

Thank you for your help

Replies

  • rf1234rf1234 Posts: 2,991Questions: 87Answers: 421

    Do you mean something like this?

    var activeUserCount = 0;
    dt.rows({ selected: true }).every( function ( rowIdx, tableLoop, rowLoop ) {
        var data = this.data();
        if ( data.user.active ) {
            activeUserCount++;
        }
    });
    
  • SWATswatSWATswat Posts: 109Questions: 0Answers: 0

    thank you for your help,
    I'm gonna try

    think.

This discussion has been closed.