mirror of https://github.com/rancher/ui.git
Support disabling rows
This commit is contained in:
parent
8f0eb396a3
commit
8f22791e9d
|
|
@ -18,7 +18,7 @@ function toggleInput(node, on) {
|
|||
if ( id ) {
|
||||
let input = $(`input[nodeid="${id}"]`); // eslint-disable-line
|
||||
|
||||
if ( input && input.length ) {
|
||||
if ( input && input.length && !input[0].disabled ) {
|
||||
// can't reuse the input ref here because the table has rerenderd and the ref is no longer good
|
||||
$(`input[nodeid="${id}"]`).prop('checked', on); // eslint-disable-line
|
||||
|
||||
|
|
@ -557,13 +557,11 @@ export default Component.extend(Sortable, StickyHeader, {
|
|||
|
||||
if ( value ) {
|
||||
this.toggleMulti(content, []);
|
||||
|
||||
return true;
|
||||
} else {
|
||||
this.toggleMulti([], content);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return get(this, 'selectedNodes.length') === get(this, 'pagedContent.length');
|
||||
}
|
||||
}),
|
||||
|
||||
|
|
@ -613,8 +611,9 @@ export default Component.extend(Sortable, StickyHeader, {
|
|||
}
|
||||
|
||||
let nodeId = tgtRow.find('input[type="checkbox"]').attr('nodeid');
|
||||
let check = tgtRow.find('input[type="checkbox"]')[0];
|
||||
|
||||
if ( !nodeId ) {
|
||||
if ( !nodeId || !check || check.disabled ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue