inline with select blanks out when clicked on

inline with select blanks out when clicked on

crcucbcrcucb Posts: 85Questions: 29Answers: 0

example: https://jyorkejudge.org/ColoredGoals_test2.php

The column Color is a select field, when I click on it to edit, it blanks out the existing value.Below is the column defintion for the tasble, the onclick event and the field definition in the editor:

    var maintable = new DataTable('#ColoredGoals', {
    ..
        columns: [
 {  title:'Color', editField:'ColoredGoals.ColorAID',data: 'Colors.ColorName', className: "editable-cell" },
..
    maintable.on('click', 'tbody td.editable-cell', function (e) {
        maineditor.inline(maintable.cell(this).index(), {
            onBlur: 'submit' 
         });    
        });
    ..
    ..
        var maineditor = new DataTable.Editor( {
        ..
  {  label: 'ColorAID', name: 'ColoredGoals.ColorAID',  type: 'select',     placeholder: '(none)' ,  placeholderDisabled: false} ,
  ...

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 65,056Questions: 1Answers: 10,772 Site admin
    Answer ✓

    Its a styling error. Because the row is selected, the text colour is white, which the select inherits.

    Add:

    div.DTE_Field select {
      color: black;
    }
    

    to the CSS for the page and it should be fixed.

    Allan

Sign In or Register to comment.