.
git repo.
: mdSelect, mdHead
: mdSelect
postLink mdSelect mdHead
function noCheckbox() {
if(attrs.mdNoCheckbox === 'true') {
return true;
}
return false;
}
mdSelect enableSelection:
function enableSelection() {
if(!noCheckbox()){
element.prepend(createCheckbox());
}
if(autoSelect()) {
element.on('click', toggle);
}
}
mdHead attachCheckbox:
function attachCheckbox() {
...
if(!noCheckbox()){
children.eq(children.length - 1).prepend(createCheckBox());
}
}
mdHead mdSelect: noCheckbox: '@mdNoCheckbox'
<thead md-head md-no-checkbox ...
<tr md-row md-no-checkbox ...
<thead md-head md-no-checkbox="true" ...
<tr md-row md-no-checkbox="false ...
:
if (vm.options.singleRowSelect) {
if (vm.selected.length >= 2) {
vm.selected.shift();
}
}
.