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

关于表格全选 #30

Closed
nabaonan opened this issue May 23, 2017 · 2 comments
Closed

关于表格全选 #30

nabaonan opened this issue May 23, 2017 · 2 comments

Comments

@nabaonan
Copy link

我用datatable生成表格,前面的checkbox是动态生成的,点击全选将其他checkbox状态设置和全选按钮一致,并调用form.render(),前两次都能管用,但是第三次就失效了,希望能更改一下这个bug,如果不调用form的render,更改checkbox后如何主动触发按钮变更状态

@sentsim
Copy link
Member

sentsim commented May 24, 2017

每次触发全选时,都需要执行一遍:form.render('checkbox');
layui 2.0会有全新的数据表格,建议到时候用layui自身的

@nabaonan
Copy link
Author

layui2大概什么时候发布,这个问题我已解决,但是很怪异,我用prop设置就好用,用attr设置就不好用,不是由render导致的,不太理解为什么会导致这个问题,网上查了一下,jquery推荐设置比如checked这样自带属性用prop,自定义属性用attr

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