Skip to content
Merged
Changes from 1 commit
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
11 changes: 9 additions & 2 deletions semcore/base-components/src/components/hint/Hint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,19 @@ export type SimpleHintPopperProps = {
defaultVisible?: boolean;
/** Function called when visibility changes */
onVisibleChange?: (visible: boolean, e?: Event) => boolean | void;
/**
* Set ignore for portal stacking
* @default true
*/
ignorePortalsStacking?: boolean;
};

type DefaultProps = {
defaultVisible?: boolean;
timeout: number | [number, number];
timingFunction: DataType.EasingFunction;
placement?: Placement;
ignorePortalsStacking?: boolean;
};

type State = {
Expand Down Expand Up @@ -100,6 +106,7 @@ class HintPopperRoot extends Component<SimpleHintPopperProps, typeof enhances, H
timeout: [500, 500],
timingFunction: 'ease-out',
placement: 'top',
ignorePortalsStacking: true,
};

constructor(props: SimpleHintPopperProps) {
Expand Down Expand Up @@ -321,7 +328,7 @@ class HintPopperRoot extends Component<SimpleHintPopperProps, typeof enhances, H

render() {
const SHintPopper = Root;
const { visible, Children, parentZIndexStacking, styles, timingFunction } = this.asProps;
const { visible, Children, parentZIndexStacking, styles, timingFunction, ignorePortalsStacking } = this.asProps;
const { innerVisible, calculatedPlacement } = this.state;

if (canUseDOM()) {
Expand All @@ -338,7 +345,7 @@ class HintPopperRoot extends Component<SimpleHintPopperProps, typeof enhances, H
const showHint = (visible && innerVisible === null) || innerVisible === true;

return sstyled(styles)(
<Portal>
<Portal ignorePortalsStacking={ignorePortalsStacking}>
<SHintPopper
render={Box}
ref={this.hintRef}
Expand Down
Loading