Editor inline select shows value -not text- after submit

Editor inline select shows value -not text- after submit

joakim-mjoakim-m Posts: 5Questions: 3Answers: 0
edited June 2015 in Editor

I have inline editor with only one editable select field. When editor open options are retrieved from external source.

editor.on('open', function() {
    var options = [];
    var location = editor.field('location').val();

    $.getJSON('getUsers?location=' + location, function(d) {
        for (var i = 0; i < d.length; i++) {
            options.push({ label: d[i].name, value: d[i].id });
        }
    });

    editor.field('boss').update(options);
});

After form is submitted, datatable will show the selected VALUE not the text.

It doesn't matter what JSON string my AJAX returns.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    It doesn't matter what JSON string my AJAX returns.

    What is the JSON returning? It should be returning an object with a row property that defines the data for the full row - Editor manual.

    Thanks,
    Allan

This discussion has been closed.