@kizmann/nano-ui 0.8.24 → 0.8.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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.25",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "author": "Eduard Kizmann <kizmann@protonmail.ch>",
@@ -790,11 +790,18 @@ 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
+ return canSelect({ item }) && ! item.depth;
795
802
  });
796
803
 
797
- let indexies = Arr.each(visible, (item) => {
804
+ let indexies = Arr.each(result, (item) => {
798
805
  return item[this.uniqueProp];
799
806
  });
800
807