Skip to content

Commit

Permalink
[fix]: remove props from watch sources
Browse files Browse the repository at this point in the history
  • Loading branch information
0x009922 committed Mar 14, 2023
1 parent 30424e9 commit 05de048
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/ui/src/components/Table/use-table-heights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ export function useTableHeights({
})

watch(
[headerHeight, tableHeight, propHeight, propMaxHeight],
([header, table, prop, propMax]) => {
[headerHeight, tableHeight],
([header, table]) => {
let heightFinal = ''
if (prop) {
if (propHeight.value) {
const bodyHeight = table - header
heightFinal = bodyHeight ? bodyHeight + 'px' : ''
}
bodyHeightStyles.height = heightFinal

let maxHeightFinal = ''
if (propMax) {
const maxHeight = parseHeight(propMax)
if (propMaxHeight.value) {
const maxHeight = parseHeight(propMaxHeight.value)
if (typeof maxHeight === 'number') {
maxHeightFinal = maxHeight - header + 'px'
}
Expand Down

0 comments on commit 05de048

Please sign in to comment.