为什么下拉菜单(自动完成)默认为第一个值? [英] Why is the dropdown (auto complete) defaulting to the first value?

查看:473
本文介绍了为什么下拉菜单(自动完成)默认为第一个值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的LightSwitch应用程序中,当屏幕首次加载时,由于某种原因,它会从下拉列表中选择默认的第一个值(自动完成).理想情况下,它应该为空白,以空的自动完成框开头. 仅当查询查询应用于屏幕设计器上的下拉菜单时,才会发生这种情况.一旦删除查询以使其使用默认查询,一切就很好,并且下拉列表未预先选择为 第一个值.

例如,在所附的搜索屏幕图像中,在屏幕负载(它是搜索屏幕)上预先选择了承租人"和债务人"值.即使Tenant 和 债务人已预先选择,搜索未根据选择过滤数据.

即使在将空值设置为自动完成框之后,它仍然会选择默认的第一行.屏幕加载完成后,我们必须在租户"控件上选择其他值,或单击清除"以删除预先选择的租户值.

我们如何解决此问题,以便在屏幕加载时下拉列表显示为空白?

任何帮助将不胜感激

解决方案

让我们看看查询


In our LightSwitch application when a screen loads for the first time, it picks up the default first value from the dropdown list (auto-complete) for some reason. Ideally it should be blank with empty auto complete box to start with. This scenario only happens when the query is applied to the dropdown on the screen designer. As soon as the query is removed so that it uses the default query, it is all good and the dropdown is not preselected to the first value. 

For example, in the attached search screen image, Tenant and Debtor values are pre-selected on the screen load (it's a search screen). Even though the values for Tenantand Debtor are pre-selected, the search is not filtering data based on the selection.

Even after setting null value to the auto complete box it still selects default first row. Once screen load is completed we have to select different value on the Tenant control or click clear to remove the pre-selected tenant value. 

How can we fix it so that dropdown appears blank when the screen loads?

Any help will be appreciated

解决方案

lets have a look at the query


这篇关于为什么下拉菜单(自动完成)默认为第一个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆