Skip to content

Commit

Permalink
fix zIndex of ArrowNavView
Browse files Browse the repository at this point in the history
  • Loading branch information
imanjra committed Nov 6, 2024
1 parent adf8f1e commit 3331aa0
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React from "react";
import { ViewPropsType } from "../utils/types";

export default function ArrowNavView(props: ViewPropsType) {
const { schema } = props;
const { schema, otherProps } = props;
const { view = {} } = schema;
const {
on_backward,
Expand All @@ -20,12 +20,16 @@ export default function ArrowNavView(props: ViewPropsType) {
} = view;
const panelId = usePanelId();
const handleClick = usePanelEvent();
const backwardStyles = positionBasedStyleBackward[position] || {};
const forwardStyles = positionBasedStyleForward[position] || {};
const { isModalPanel } = otherProps;
const zIndex = isModalPanel ? 1501 : 1000;

return (
<>
{backward && (
<Arrow
style={positionBasedStyleBackward[position]}
style={{ ...backwardStyles, zIndex }}
onClick={() => {
if (on_backward) {
handleClick(panelId, { operator: on_backward });
Expand All @@ -38,7 +42,7 @@ export default function ArrowNavView(props: ViewPropsType) {
{forward && (
<Arrow
$isRight
style={positionBasedStyleForward[position]}
style={{ ...forwardStyles, zIndex }}
onClick={() => {
if (on_forward) {
handleClick(panelId, { operator: on_forward });
Expand Down

0 comments on commit 3331aa0

Please sign in to comment.