Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tearsheet): address portalTarget type #6400

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// LICENSE file in the root directory of this source tree.
//

import React, { ForwardedRef, ReactNode, forwardRef } from 'react';
import React, { ForwardedRef, forwardRef } from 'react';
import PropTypes from 'prop-types';
import { AddSelectBody } from './AddSelectBody';
import { normalize, getGlobalFilterValues } from './add-select-utils';
Expand Down Expand Up @@ -48,7 +48,7 @@ export interface AddSelectProps {
/**
* portal target for the all tags modal
*/
portalTarget?: ReactNode;
portalTarget?: HTMLElement;
searchResultsTitle?: string;
sortByLabel?: string;
title: string;
Expand Down Expand Up @@ -172,6 +172,7 @@ AddSelect.propTypes = {
/**
* portal target for the all tags modal
*/
/**@ts-ignore */
portalTarget: PropTypes.node,
searchResultsTitle: PropTypes.string,
sortByLabel: PropTypes.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// LICENSE file in the root directory of this source tree.
//

import React, { ForwardedRef, ReactNode, forwardRef, useState } from 'react';
import React, { ForwardedRef, forwardRef, useState } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { Tag } from '@carbon/react';
Expand Down Expand Up @@ -67,7 +67,7 @@ export interface AddSelectBodyProps {
onSubmit?: (selection) => void;
onSubmitButtonText?: string;
open?: boolean;
portalTarget?: ReactNode;
portalTarget?: HTMLElement;
searchResultsTitle?: string;
sortByLabel?: string;
title?: string;
Expand Down Expand Up @@ -457,6 +457,7 @@ AddSelectBody.propTypes = {
onSubmit: PropTypes.func,
onSubmitButtonText: PropTypes.string,
open: PropTypes.bool,
/**@ts-ignore */
portalTarget: PropTypes.node,
searchResultsTitle: PropTypes.string,
sortByLabel: PropTypes.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export interface TearsheetProps extends PropsWithChildren {
/**
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
*/
portalTarget?: ReactNode;
portalTarget?: HTMLElement;

/**
* Specify a CSS selector that matches the DOM element that should be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ interface TearsheetNarrowBaseProps extends PropsWithChildren {
/**
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
*/
portalTarget?: ReactNode;
portalTarget?: HTMLElement;

/**
* Specify a CSS selector that matches the DOM element that should be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ interface TearsheetShellProps extends PropsWithChildren {
/**
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
*/
portalTarget?: ReactNode;
portalTarget?: HTMLElement;

/**
* Specify a CSS selector that matches the DOM element that should be
Expand Down
Loading