Comments (2)
找到原因了
if (d.elem.results.find('li').size())
这行代码的本意是判断搜索结果是否为空,如果为空,则会到else里清空input内容;但是,实际调试结果是,d.elem.results.find('li').size()的结果永远都不可能为0; 因为当搜索无结果时,d.elem.results.find('li') 会包含一个 li.sp_message_box; 也就是无查询结果
这个li; 大哥啊,你能不能不要这么坑啊;
用这个插件,简直一步一个坑啊; 这已经不是功能逻辑问题;而是粗心大意了;
解决方式:
给if条件加一个排除
if (d.elem.results.find('li').not('li.sp_message_box').size())
from selectpage.
首先非常羞愧于插件的细节处理有这么多毛病,这个问题确实存在,这是在增加一个功能后,对原有功能出现影响的问题。
插件参数太多,交错使用的方式和场景太多,每次新增一个功能或新发布一个版本,会对新增的功能及相关的功能进行测试,每次都进行完整的全功能回归测试,以这点点时间和精力来说,不现实,这也是多数个人开源插件的不足之处
但我会尽可能多做测试,也感谢你多次在使用中提出各种意见和建议,曾经有小兄弟在提 issues 时说自己是小白鼠,语气和心情估计跟你差不多,都说各种踩坑,在此只能再次向你们道歉,给你们工作添麻烦
该问题已在 v2.13
中修复
from selectpage.
Related Issues (20)
- 问题 HOT 1
- 加载多次的情况下会叠加加载,不会清除再加载
- 控件加载完以后如何设置默认值
- 功能建议 HOT 5
- 多项选择模式未提供全选当前页的回调事件
- 分页多选,超过分页每页的数量后,数据回显有问题
- selectPageRefresh会触发eTagRemove,并且传入了选中项目,导致删除了项目
- 2.19版本的calcResultsSize的screenTop获取是基于window对象的没办法在绝对定位的父元素自动改变位置
- 该插件不支持输入吗?
- 下拉框文本自定义后,添加默认选中
- Ajax请求下,多关键字联合查询会出Bug,加了空格后没有反应
- 选择内容太多,分页框被挤下去,无法切换下一页
- 修正默认选中值无效BUG
- angular中使用select page
- 建议下拉框 可自己设置 上下位置 ,我在用的过程中下拉框的位置 有时跑到上面不美观 HOT 1
- 建议在初始选中时触发一次eSelect HOT 1
- 下拉输入框在苹果手机端不能用 HOT 1
- let user to add a new entry HOT 1
- ajax情况下的beforeSend事件 HOT 3
- Ajax情况中怎么设置请求头呢 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from selectpage.