Selected option in in-cell select dropdown

Selected option in in-cell select dropdown

janpolsenjanpolsen Posts: 1Questions: 1Answers: 0

Is it possible to add attribute to option in select dropdown?
I need to set selected option so default is not always first option

https://editor.datatables.net/reference/field/select

editor.add( {
    type:  "select",
    label: "Locations:",
    name:  "locations",
    options: [
        { label: "Edinburgh", value: 51 },
        { label: "London",    value: 76, selected: true} // Something like this
    ]
} );

Answers

Sign In or Register to comment.