Home  >  Q&A  >  body text

javascript - easyui combobox, valueField display problem

This page is to be an input box. After entering a word, the database will be automatically queried and the matching options will be displayed.


$('#supplier_name').combobox({
            valueField:'supplier_id',
            textField:'supplier_name',
            required:true,
            onChange:function(value){
                var url = "XXXXXXXXXXXXXX" + value ;
                $('#supplier_name').combobox('reload',url);
            }
        });

This is no problem. The problem is that when I select the value that appears, the textField should be displayed. When the valueField is actually displayed, how should I handle this?

迷茫迷茫2686 days ago881

reply all(2)I'll reply

  • 漂亮男人

    漂亮男人2017-07-05 10:52:45

    valueField:'supplier_id',
    textField:'supplier_name',

    Is it wrong to initialize these two values

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-07-05 10:52:45

    I took a screenshot from the official Demo, which is below. I can’t see the problem from the code you posted, and I didn’t find any relevant settings in EasyUI’s documentation, so I suggest you check whether there are other libraries that conflict with easyui, or whether you have handled it in an event. I passed this thing and reassigned its value.

    reply
    0
  • Cancelreply