javascript - easyui combobox, valueField display problem
迷茫
迷茫 2017-07-05 10:50:45
0
2
892

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?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
漂亮男人
valueField:'supplier_id',
textField:'supplier_name',

Is it wrong to initialize these two values

淡淡烟草味

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template