free-jqGrid 中的 Selectize 插件不显示所有值
Selectize plugin in free-jqGrid does not display all values
我正在使用 free-jqGrid 4.13.5 并选择 0.12.4。
我正在尝试在内联编辑中对我的下拉菜单应用选择。但是下拉列表中只显示一个值。
editoptions: {
value: "FE:FedEx;TN:TNT;IN:Intime",
defaultValue: "Intime",
dataInit: function(element) {
$(element).selectize();
}
如果我使用 select2 而不是 selectize,它会起作用。
主要问题好像是selectize的下拉父级。要解决此问题,我建议您使用 dropdownParent: "body"
选项:
dataInit: function(element) {
$(element).selectize({
dropdownParent: "body"
});
}
固定演示 https://jsfiddle.net/OlegKi/90hj0wd9/2/ 使用更改。我添加了一些其他 CSS 属性来改善结果的外观:
.selectize-dropdown-content {
font-size: 11px;
font-family: "Lucida Grande", "Lucida Sans", Arial, sans-serif
}
.selectize-input {
min-height: 1.7em;
}
.selectize-input {
padding: .4em .3em;
}
.DataTD .selectize-control {
height: 24px;
}
.ui-jqgrid tr.jqgrow > td {
border-color: inherit;
}
我正在使用 free-jqGrid 4.13.5 并选择 0.12.4。
我正在尝试在内联编辑中对我的下拉菜单应用选择。但是下拉列表中只显示一个值。
editoptions: {
value: "FE:FedEx;TN:TNT;IN:Intime",
defaultValue: "Intime",
dataInit: function(element) {
$(element).selectize();
}
如果我使用 select2 而不是 selectize,它会起作用。
主要问题好像是selectize的下拉父级。要解决此问题,我建议您使用 dropdownParent: "body"
选项:
dataInit: function(element) {
$(element).selectize({
dropdownParent: "body"
});
}
固定演示 https://jsfiddle.net/OlegKi/90hj0wd9/2/ 使用更改。我添加了一些其他 CSS 属性来改善结果的外观:
.selectize-dropdown-content {
font-size: 11px;
font-family: "Lucida Grande", "Lucida Sans", Arial, sans-serif
}
.selectize-input {
min-height: 1.7em;
}
.selectize-input {
padding: .4em .3em;
}
.DataTD .selectize-control {
height: 24px;
}
.ui-jqgrid tr.jqgrow > td {
border-color: inherit;
}