From 6dc3b61b281e4f135e9fca9172d7e1228a8ec057 Mon Sep 17 00:00:00 2001 From: Marcus Notheis Date: Wed, 3 Jul 2024 09:04:54 +0200 Subject: [PATCH 1/2] fix(ObjectStatus): remove `HTMLDivElement` from `onClick` type BREAKING CHANGE: **TypeScript**: the `HTMLDivElement` type has been removed from the `onClick` handler. --- packages/main/src/components/ObjectStatus/index.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/main/src/components/ObjectStatus/index.tsx b/packages/main/src/components/ObjectStatus/index.tsx index 15bfa122edf..fd49043d523 100644 --- a/packages/main/src/components/ObjectStatus/index.tsx +++ b/packages/main/src/components/ObjectStatus/index.tsx @@ -100,11 +100,9 @@ export interface ObjectStatusPropTypes extends CommonProps { * * __Note:__ This prop has no effect if `active` is not set to `true`. * - * __Note:__ In order to support legacy code, `HTMLDivElement` is still supported even though the `click` event is never fired if the component isn't `active`. - * * @since 0.16.6 */ - onClick?: MouseEventHandler; + onClick?: MouseEventHandler; } const getStateSpecifics = (state, showDefaultIcon, userIcon, stateAnnouncementText, i18nTexts) => { From f9b751f6bc6cabaabb7ed203fb503e520307ff99 Mon Sep 17 00:00:00 2001 From: Lukas Harbarth Date: Wed, 3 Jul 2024 11:56:41 +0200 Subject: [PATCH 2/2] add `@ts-expect-error` for `onClick` --- packages/main/src/components/ObjectStatus/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/main/src/components/ObjectStatus/index.tsx b/packages/main/src/components/ObjectStatus/index.tsx index fd49043d523..b177e914b10 100644 --- a/packages/main/src/components/ObjectStatus/index.tsx +++ b/packages/main/src/components/ObjectStatus/index.tsx @@ -221,6 +221,7 @@ const ObjectStatus = forwardRef