diff --git a/src/components/DataTable.vue b/src/components/DataTable.vue index cc97fa8..fa492a9 100644 --- a/src/components/DataTable.vue +++ b/src/components/DataTable.vue @@ -367,7 +367,7 @@ const { } = toRefs(props); // style related computed variables -const tableHeightPx = computed(() => (tableHeight.value ? `${tableHeight.value}px` : null)); +const tableHeightPx = computed(() => (tableHeight.value ? (isFinite(tableHeight.value) ? `${tableHeight.value}px` : tableHeight.value) : null)); const tableMinHeightPx = computed(() => `${tableMinHeight.value}px`); // global style related variable diff --git a/src/propsWithDefault.ts b/src/propsWithDefault.ts index ca60642..c3dd9a5 100644 --- a/src/propsWithDefault.ts +++ b/src/propsWithDefault.ts @@ -132,7 +132,7 @@ export default { default: 180, }, tableHeight: { - type: Number, + type: [Number, String], default: null, }, themeColor: {