简体   繁体   English

dijit.form.FilteringSelect不显示任何值

[英]dijit.form.FilteringSelect does not display any value

I create a filtering select like so: 我创建一个过滤选择,如下所示:

var lensMapServiceFS = new dijit.form.FilteringSelect({
 displayedValue: this.layerNames[0],
 value: this.layerNames[0],
 name: "lensMapServiceFS", 
 required: false,
 store: lensMapServiceOptions, 
 searchAttr: "name",
 style: {'width': '100px', 'fontSize': '8pt'}
}, this.id + ".lensMapService");

But when my page loads, nothing is displayed in the filtering select. 但是,当我的页面加载时,筛选选择中不显示任何内容。 All the values from my store display when you cilck the drop down but nothing is actually displayed in the filtering select. 当您单击下拉列表时,将显示我商店中的所有值,但过滤选择中实际上什么也没有显示。 If I call getValue() or getDisplayedValue() from the firebug or chorme console the correct value is returned. 如果我从Firebug或chorme控制台调用getValue()或getDisplayedValue(),则返回正确的值。 Any ideas? 有任何想法吗?

Well, it turned out to be a simple css issue. 好吧,事实证明这是一个简单的CSS问题。 The value was actually there, but the text color was white on a white background. 该值实际上在那里,但是文本颜色是白色背景上的白色。 I added 'color': '#444' to the style property in the constructor and all is well. 我在构造函数的style属性中添加了“ color”:“#444”,一切都很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM