Skip to content

Commit 90f6638

Browse files
committed
fix: allow null in ref types for strict null check compatibility
1 parent d82d156 commit 90f6638

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/components/src/components/tab-list/tab-list.lite.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ useMetadata({});
1111
useDefaultProps<DBTabListProps>({});
1212

1313
export default function DBTabList(props: DBTabListProps) {
14-
const _ref = useRef<HTMLDivElement | any>(null);
14+
const _ref = useRef<HTMLDivElement | null>(null);
1515
const state = useStore<DBTabListState>({
1616
_id: props.id || 'tab-list-' + uuid()
1717
});

packages/components/src/components/tab-panel/tab-panel.lite.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ useMetadata({});
1515
useDefaultProps<DBTabPanelProps>({});
1616

1717
export default function DBTabPanel(props: DBTabPanelProps) {
18-
const _ref = useRef<HTMLDivElement>(null);
18+
const _ref = useRef<HTMLDivElement | null>(null);
1919

2020
const state = useStore<DBTabPanelState>({
2121
internalHidden: props.hidden,

packages/components/src/components/tabs/tabs.lite.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ interface DBTabsLocalState extends DBTabsState {
2828
}
2929

3030
export default function DBTabs(props: DBTabsProps) {
31-
const _ref = useRef<HTMLDivElement>(null);
31+
const _ref = useRef<HTMLDivElement | null>(null);
3232

3333
const state = useStore<DBTabsLocalState>({
3434
_id: 'tabs-base-id',

0 commit comments

Comments
 (0)