Skip to content

Commit c9768b2

Browse files
committed
fix: clean up v-bind props
1 parent d3a2491 commit c9768b2

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

packages/lazy-table-renderer/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { PivotUtilities } from 'vue-pivottable'
55
export default markRaw({
66
'Lazy Table': defineComponent({
77
name: 'vue-lazy-table',
8+
props: { ...PivotUtilities.defaultProps },
89
setup(props) {
910
return () =>
1011
h(LazyPivottableRenderer, {
11-
...PivotUtilities.defaultProps,
1212
...props,
1313
chunkSize: 50,
1414
bufferSize: 1

src/components/pivottable-ui/VPivottableUi.vue

+24-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
name="outputSlot"
109109
:outputSlot="{ pivotData }"
110110
>
111-
<VPivottable v-bind="state" />
111+
<VPivottable v-bind="pivotProps" />
112112
</slot>
113113
</td>
114114
</tr>
@@ -226,7 +226,29 @@ const unusedAttrs = computed(() => {
226226
})
227227
228228
const pivotData = computed(() => new PivotData(state))
229-
229+
const pivotProps = computed(() => ({
230+
data: state.data,
231+
aggregators: state.aggregators,
232+
aggregatorName: state.aggregatorName,
233+
heatmapMode: state.heatmapMode,
234+
tableOptions: state.tableOptions,
235+
renderers: state.renderers,
236+
rendererName: state.rendererName,
237+
locale: state.locale,
238+
languagePack: state.languagePack,
239+
showRowTotal: state.showRowTotal,
240+
showColTotal: state.showColTotal,
241+
cols: state.cols,
242+
rows: state.rows,
243+
vals: state.vals,
244+
attributes: state.attributes,
245+
valueFilter: state.valueFilter,
246+
sorters: state.sorters,
247+
derivedAttributes: state.derivedAttributes,
248+
rowOrder: state.rowOrder,
249+
colOrder: state.colOrder,
250+
tableMaxWidth: state.tableMaxWidth
251+
}))
230252
onUpdateUnusedOrder(props.unusedAttrs)
231253
232254
provideFilterBox(props)

0 commit comments

Comments
 (0)