You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first problem is that TearsheetShell.tsx defines portalTarget as a ReactNode whereas presumably it’s supposed to be Element;
/**
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
*/
portalTarget?: ReactNode;
At the least, the description and the typescript declaration don’t seem to match.
But my main issue is that I get Typescript errors because (like most code) my <Tearsheet> declaration doesn’t specify portalTarget. Somehow the distribution (from NPM) has a Tearsheet.d.ts file that claims that portalTarget is mandatory:
/**
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
*/
portalTarget: portalType,
It should be marked as optional.
Component(s) impacted
Tearsheet, TearsheetShell, TearsheetNarrow
Browser
Chrome
@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version
Package
Carbon for IBM Products
Description
The first problem is that TearsheetShell.tsx defines
portalTarget
as aReactNode
whereas presumably it’s supposed to beElement
;At the least, the description and the typescript declaration don’t seem to match.
But my main issue is that I get Typescript errors because (like most code) my
<Tearsheet>
declaration doesn’t specifyportalTarget
. Somehow the distribution (from NPM) has a Tearsheet.d.ts file that claims thatportalTarget
is mandatory:It should be marked as optional.
Component(s) impacted
Tearsheet, TearsheetShell, TearsheetNarrow
Browser
Chrome
@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version
2.45.0
Suggested Severity
None
Product/offering
IKC
CodeSandbox or Stackblitz example
https://carbon-for-ibm-products.netlify.app/?path=/story/ibm-products-components-tearsheet--tearsheet&globals=viewport:basic
Steps to reproduce the issue (if applicable)
No response
Release date (if applicable)
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: