Skip to content

Commit

Permalink
chore: small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Nov 7, 2023
1 parent c43849a commit 20b38bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tab/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
useRef,
} from 'react'
import Tab from './index'
import { useForceUpdate } from '../share/hooks'
import { useForceUpdate, useNonInitialEffect } from '../share/hooks'

interface ITabProps {
height?: number
Expand Down Expand Up @@ -37,7 +37,7 @@ const LunaTab: FC<PropsWithChildren<ITabProps>> = (props) => {
return () => tab.current?.destroy()
}, [])

useEffect(() => {
useNonInitialEffect(() => {
if (tab.current) {
tab.current.setOption('height', props.height)
}
Expand Down

0 comments on commit 20b38bd

Please sign in to comment.