Version: EasyUI 1.7.0

When writing a project with Easyui, I encountered a bizarre bug in combobox. The code is as follows:

<div>
    <select class="easyui-combobox" id="edit_sex" name="sex" data-options="Label :' Gender :', width:300, required:true">
        <option value="true"> Male </option> <option value="false"> female </option> </select> </div>Copy the code

The assignment statement looks like this:

$('#edit_sex').combobox('setValue', row.sex);
Copy the code

This was supposed to be a very simple combobox assignment, but when I actually did the assignment, I had a problem. There was always a bug that after the assignment, the Combobox would say true or false instead of male or female, and the repetition rate was extremely high. When I tested other assignments, IT was the row.sex value that had the problem. This value is of Boolean type. Combobox often displays value instead of text when assigning a Boolean value. The problem is simple. Change the Boolean type to a string. The modified assignment statement is as follows:

$('#edit_sex').combobox('setValue', String(row.sex));
Copy the code

The cause of the bug is unknown. If anyone knows the answer, thank you.