@tanstack/vue-table 8.5.1 → 8.5.4

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": "@tanstack/vue-table",
3
3
  "author": "Tanner Linsley",
4
- "version": "8.5.1",
4
+ "version": "8.5.4",
5
5
  "description": "Headless UI for building powerful tables & datagrids for Vue.",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/tanstack/table#readme",
@@ -35,7 +35,7 @@
35
35
  "src"
36
36
  ],
37
37
  "dependencies": {
38
- "@tanstack/table-core": "8.5.1"
38
+ "@tanstack/table-core": "8.5.4"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "vue": "^3.2.33"
package/src/index.ts CHANGED
@@ -4,22 +4,25 @@ import {
4
4
  TableOptionsResolved,
5
5
  RowData,
6
6
  } from '@tanstack/table-core'
7
- import { h, watchEffect, ref, VNode } from 'vue'
7
+ import { h, watchEffect, ref } from 'vue'
8
8
  import { mergeProxy } from './merge-proxy'
9
9
 
10
10
  export * from '@tanstack/table-core'
11
11
 
12
- export function flexRender<TProps extends {}>(
13
- Comp: any,
14
- props: TProps
15
- ): VNode | string | number | boolean | null {
16
- if (!Comp) return null
17
-
18
- if (typeof Comp === 'function') {
19
- return h(Comp, props)
20
- }
12
+ export const FlexRender = {
13
+ props: ['render', 'props'],
14
+ setup: (props: { render: any; props: any }) => {
15
+ return () => {
16
+ if (
17
+ typeof props.render === 'function' ||
18
+ typeof props.render === 'object'
19
+ ) {
20
+ return h(props.render, props.props)
21
+ }
21
22
 
22
- return Comp
23
+ return props.render
24
+ }
25
+ },
23
26
  }
24
27
 
25
28
  export function useVueTable<TData extends RowData>(
@@ -70,9 +73,5 @@ export function useVueTable<TData extends RowData>(
70
73
  })
71
74
  })
72
75
 
73
- // onBeforeUpdate(() => {
74
- // table.willUpdate()
75
- // })
76
-
77
76
  return table
78
77
  }