Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一些想法 #8

Closed
MonkSoul opened this issue Aug 26, 2017 · 5 comments
Closed

一些想法 #8

MonkSoul opened this issue Aug 26, 2017 · 5 comments

Comments

@MonkSoul
Copy link

MonkSoul commented Aug 26, 2017

非常感谢您提供这么好的插件,目前有一些想法:

  • 多选有清除内容的功能,单项没有清除功能,需要我们自己delete删除。但是如果我们设置文本框只读时就无法删除内容了。(也就是无法取消选中)

  • 我们选中了某个选项,但是由于我们文本框可以删除数据,这时我删除了几个字,失去焦点之后就和我们下拉数据对不上了。这样无法保障我们录入数据的正确性。是否能够新增一个参数(可以配置是否同步文本框内容):如果用户选中之后又调整了文本框内容,当失去焦点之后选中上一次选中的值(也可以说是没有动过文本框内容的值)

@TerryZ
Copy link
Owner

TerryZ commented Aug 26, 2017

  • 不管是单选还是多选模式,$('xxx').selectPageClear();的API都会清空所有选中项目,这个在 https://terryz.github.io/demo.html 的DEMO页面第1个演示项目的第二个按钮“清除所有选中项目”就是具体的实例

  • 实际向服务端提交数据的是一个hidden隐藏域,而它的name属性正是初始化input的name,输入框中的文本内容不会影响数据的正确性,另外设置noResultClean : true也可以达到无匹配项目自动清除手动输入的内容

@MonkSoul
Copy link
Author

MonkSoul commented Aug 26, 2017

不好意思,可能第一个我说的不是很明白,我指的是内置的按钮删除,并非外部调用。和多选一样,有清除按钮。

第二点明白了,非常感谢。

@TerryZ
Copy link
Owner

TerryZ commented Aug 27, 2017

单选模式下,将输入框的文字全部清除,就是清除选中的功能

@MonkSoul
Copy link
Author

如果输入框拥有readonly的话,目前无法清除数据。

@TerryZ
Copy link
Owner

TerryZ commented Sep 7, 2017

@MonkSoul 目前最新发布的v2.4版本已经增加了单选模式下选中了项目,自动出现清除的小图标,同时增加关闭分页栏,增加纯选择的模式

@TerryZ TerryZ closed this as completed Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants