@serhiitupilow/nuxt-table 0.1.6 → 0.1.7

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@serhiitupilow/nuxt-table",
3
3
  "configKey": "nuxtTable",
4
- "version": "0.1.6",
4
+ "version": "0.1.7",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { computed, toRef, useAttrs } from "vue";
2
+ import { computed, getCurrentInstance, toRef } from "vue";
3
3
  import { useNuxtTable } from "../composables/useNuxtTable";
4
4
  const props = defineProps({
5
5
  columns: { type: Array, required: true },
@@ -14,12 +14,14 @@ const props = defineProps({
14
14
  classNames: { type: Object, required: false }
15
15
  });
16
16
  const emit = defineEmits(["columnOrderChange", "manualSortChange", "manualFilterChange"]);
17
- const attrs = useAttrs();
17
+ const instance = getCurrentInstance();
18
18
  const hasManualSortChangeListener = computed(() => {
19
- return Boolean(attrs.onManualSortChange);
19
+ const vnodeProps = instance?.vnode.props;
20
+ return Boolean(vnodeProps?.onManualSortChange);
20
21
  });
21
22
  const hasManualFilterChangeListener = computed(() => {
22
- return Boolean(attrs.onManualFilterChange);
23
+ const vnodeProps = instance?.vnode.props;
24
+ return Boolean(vnodeProps?.onManualFilterChange);
23
25
  });
24
26
  const defaultClassNames = {
25
27
  root: "nuxt-table",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serhiitupilow/nuxt-table",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Nuxt module with a functional table component (sorting, filtering, column visibility, resize, optional DnD)",
5
5
  "type": "module",
6
6
  "license": "MIT",