aloha-vue 1.0.264 → 1.0.265

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,7 +1,7 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
3
  "description": "Project aloha",
4
- "version": "1.0.264",
4
+ "version": "1.0.265",
5
5
  "author": "Ilia Brykin",
6
6
  "scripts": {
7
7
  "build-icons": "node scriptsNode/iconsSvgToJs.js bootstrap3 && node scriptsNode/iconsSvgToJs.js bootstrap-1-9-1"
@@ -1,5 +1,5 @@
1
1
  import {
2
- h,
2
+ h, watch,
3
3
  } from "vue";
4
4
 
5
5
  import AGroupButtonDropdownItem from "./AGroupButtonDropdownItem/AGroupButtonDropdownItem";
@@ -62,23 +62,36 @@ export default {
62
62
  type: Boolean,
63
63
  required: false,
64
64
  default: () => groupButtonDropdownPluginOptions.value.propsDefault.useDropdownActionClass,
65
- }
65
+ },
66
+ innerFlagHasActions: {
67
+ type: Boolean,
68
+ required: false,
69
+ },
66
70
  },
67
- setup(props) {
71
+ emits: [
72
+ "update:innerFlagHasActions",
73
+ ],
74
+ setup(props, { emit }) {
68
75
  const {
69
76
  actionsAllFiltered,
70
77
  actionsGrouped,
78
+ hasActionsAllFiltered,
71
79
  hasDropdownActions,
72
80
  } = ActionsAPI(props);
73
81
 
82
+ watch(hasActionsAllFiltered, newValue => {
83
+ emit("update:innerFlagHasActions", newValue);
84
+ });
85
+
74
86
  return {
75
87
  actionsAllFiltered,
76
88
  actionsGrouped,
89
+ hasActionsAllFiltered,
77
90
  hasDropdownActions,
78
91
  };
79
92
  },
80
93
  render() {
81
- if (this.actionsAllFiltered.length) {
94
+ if (this.hasActionsAllFiltered) {
82
95
  return h("div", {
83
96
  class: "aloha_group_btn_dropdown",
84
97
  }, [
@@ -99,9 +99,14 @@ export default function ActionsAPI(props) {
99
99
  return actionsGrouped.value.dropdown.length > 0;
100
100
  });
101
101
 
102
+ const hasActionsAllFiltered = computed(() => {
103
+ return actionsAllFiltered.value.length > 0;
104
+ });
105
+
102
106
  return {
103
107
  actionsAllFiltered,
104
108
  actionsGrouped,
109
+ hasActionsAllFiltered,
105
110
  hasDropdownActions,
106
111
  };
107
112
  }