如果两列具有相同的值,但大小写不同,即第一列使用小写,第二列使用大写,那么flex monster将为这两个值显示第一个大小写。我有两个国家/地区的数据,它们的描述具有相同的值,但大小写不同。flexmonster所做的是,它占用第一列的外壳,并填充到其他列中。在这种情况下,所有描述字段都是大写的描述。
new Flexmonster({
container: "#pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
report: {
dataSource: {
dataSourceType: "json",
data: [
{Country:'USA',description:'discription'}, // description in small
{Country:'India',description:'DISCRIPTION'}, // description in capital
{Country:'BLA',description:'dIsCrIPtiOn'}, // description mixed
]
},
options: {
grid: {
type: "flat"
},
configuratorActive: false
},
slice: {
columns: [{
uniqueName: "Country"
},
{
uniqueName: "description"
}
]
}
},
width: "100%",
height: 370
});我的问题是为什么flexmonster.js要这么做?需要解决方案如何保持字段不区分大小写?
发布于 2019-06-19 17:39:33
从2.7.7版本(https://www.flexmonster.com/release-notes/version-2-7-7/)开始,caseSensitiveMembers在options对象中有一个属性,用于区分不同大小写的成员: Flexmonster
在options对象中需要按如下方式指定caseSensitiveMembers属性(参考https://www.flexmonster.com/question/string-auto-formatting-seems-to-be-applied-to-all-items-in-a-single-column/ ):
options: {
caseSensitiveMembers: true
}以下是用于说明的JSFiddle示例的修改版本:https://jsfiddle.net/flexmonster/0ut6rxLe/
希望这能有所帮助:)
https://stackoverflow.com/questions/56525480
复制相似问题