如何在Backrid.js中省略select all事件中的复选框

How to omit checkbox from select-all event in Backrid.js

本文关键字:事件 all 复选框 select Backrid js 中省      更新时间:2023-09-26

在我的收藏中,有一些模型我想排除在外。有没有办法让复选框不响应选择所有事件?我希望它保持checkeddisabled。我试过在Backgrid:之外做这件事

        @$el.find("tr.inactive")
        .find(":checkbox")
        .prop("disabled", true)
        .prop("checked", true)

但它在每个"backgrid:select-all"事件上都被覆盖。

您可能需要选择所有选项,然后根据不想选择的选项进行筛选。这种情况在sql中经常发生。类似于:

.filter(function( index ) {
  return !index === 'whateverSelector';
})