Datatables editor node.js - How to order option value

Datatables editor node.js - How to order option value

CapamaniaCapamania Posts: 233Questions: 81Answers: 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: 233Questions: 81Answers: 5
    edited January 2019 Answer ✓

    Ok ... what works is ...

    new Field('users.site')
        .options(new Options()
            .table('sites')
            .value('id')
            .label('name')
            .order('name', 'asc')
        );
    
This discussion has been closed.