@kizmann/nano-ui 0.8.24 → 0.8.26

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizmann/nano-ui",
3
- "version": "0.8.24",
3
+ "version": "0.8.26",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "author": "Eduard Kizmann <kizmann@protonmail.ch>",
@@ -790,11 +790,22 @@ export default {
790
790
 
791
791
  selectAll()
792
792
  {
793
- let visible = Arr.filter(this.visible, (item) => {
794
- return ! item.depth;
793
+ let result = Arr.filter(this.visible, (item) => {
794
+
795
+ let canSelect = this.allowSelect;
796
+
797
+ if ( ! Any.isFunction(canSelect) ) {
798
+ canSelect = () => this.allowSelect;
799
+ }
800
+
801
+ let row = {
802
+ value: item, item: Obj.get(this, item.route)
803
+ };
804
+
805
+ return ! item.depth && canSelect(row);
795
806
  });
796
807
 
797
- let indexies = Arr.each(visible, (item) => {
808
+ let indexies = Arr.each(result, (item) => {
798
809
  return item[this.uniqueProp];
799
810
  });
800
811