Datatables editor node.js - How to order option value

Datatables editor node.js - How to order option value

CapamaniaCapamania Posts: 184Questions: 64Answers: 5

How do I correctly order a option value? This doesn't seem to work:

new Field('users.site')
    .options(new Options()
        .table('sites')
        .value('id')
        .label('name')
        .order(desc)
    );

This question has an accepted answers - jump to answer

Answers

  • CapamaniaCapamania Posts: 184Questions: 64Answers: 5
    edited January 12 Answer ✓

    Ok ... what works is ...

    new Field('users.site')
        .options(new Options()
            .table('sites')
            .value('id')
            .label('name')
            .order('name', 'asc')
        );
    
Sign In or Register to comment.