Giter Site home page Giter Site logo

[BUG] dmc.HoverCard blocked by other components when placed in a dmc.AccordionMultiple with style={'postion': ‘fixed’} set. about dash-mantine-components HOT 9 OPEN

Kevinckyy avatar Kevinckyy commented on May 29, 2024
[BUG] dmc.HoverCard blocked by other components when placed in a dmc.AccordionMultiple with style={'postion': ‘fixed’} set.

from dash-mantine-components.

Comments (9)

RainyBlue-w avatar RainyBlue-w commented on May 29, 2024

I have also met this BUG ! Wish someone could figure out what happened and solve it ... 😢

from dash-mantine-components.

CNFeffery avatar CNFeffery commented on May 29, 2024

@Kevinckyy @RainyBlue-w Components with similar functionality: https://fac.feffery.tech/AntdPopover

from dash-mantine-components.

RainyBlue-w avatar RainyBlue-w commented on May 29, 2024

@Kevinckyy @RainyBlue-w Components with similar functionality: https://fac.feffery.tech/AntdPopover

Thank you! I have tried the fac, it's a wonderful package, but the problem can only be partially solved. When I set popupContainer = 'parent' , the same bug occured. This is the code:

from dash import html
from dash import dcc
import dash_mantine_components as dmc
import feffery_antd_components as fac
from dash_extensions.enrich import DashProxy
from dash_iconify import DashIconify

app = DashProxy()

app.layout = dmc.Grid(
  [
    dmc.Col(
      [
        html.Span(
          dmc.AccordionMultiple(
            [
              dmc.AccordionItem([
                dmc.AccordionControl('test'),
                dmc.AccordionPanel([
                  fac.AntdPopover(
                    children=[
                      dmc.ActionIcon(
                        DashIconify(icon = 'akar-icons:circle-fill', color='#fa5252', width=48),
                        variant='transparent', mt=3
                      )
                    ],
                    content =[
                        dmc.ColorPicker(format='hex', value='#fa5252'),
                        dmc.TextInput(value='#fa5252'),
                    ],
                    popupContainer = 'parent'
                  ),
                ]),
              ], value='test')
            ],
          ),
          style={'position': 'fixed', 'width': '40vh'},
        ),
      ],
      span=2
    ),
    dmc.Col(
      [
        dcc.Graph(figure={}),
        dmc.Text('This is a `dmc.Text` component'),
        dmc.RangeSlider(),
        dcc.Graph(figure={})
      ],
      span=10
    )
  ]
)

from dash-mantine-components.

CNFeffery avatar CNFeffery commented on May 29, 2024

@Kevinckyy why set popupContainer = 'parent', it is only used in some special layouts, what do you expect the layout to look like.

from dash-mantine-components.

RainyBlue-w avatar RainyBlue-w commented on May 29, 2024

@Kevinckyy why set popupContainer = 'parent', it only used in some special layout.

Because I want to let the hoverCard rolling with it's target

from dash-mantine-components.

CNFeffery avatar CNFeffery commented on May 29, 2024

@Kevinckyy why set popupContainer = 'parent', it only used in some special layout.

Because I want to let the hoverCard rolling with it's target

Since your AntdPopover is within a fixed element, a fixed element means it won't be rolled by scrolling in the current page.🤔

from dash-mantine-components.

RainyBlue-w avatar RainyBlue-w commented on May 29, 2024

@Kevinckyy why set popupContainer = 'parent', it only used in some special layout.

Because I want to let the hoverCard rolling with it's target

Since your AntdPopover is within a fixed element, a fixed element means it won't be rolled by scrolling in the current page.🤔

You could try to run the code, when I roll on the right, the hoverCard will also be rolling if I down't set popupContainer

from dash-mantine-components.

CNFeffery avatar CNFeffery commented on May 29, 2024

@RainyBlue-w
Because your AntdPopover is bound within a container that has a fixed layout, achieving a perfect balance is not possible. However, when the mouse moves out of the AntdPopover area, it will automatically close by default. Therefore, there is no need to worry about the specific scenario of moving the mouse to the right area and scrolling.

from dash-mantine-components.

RainyBlue-w avatar RainyBlue-w commented on May 29, 2024

@CNFeffery Thank you, I have understand it! Now I'm using fac instead of dmc to build my hoverCard, fac is really a useful components package!

from dash-mantine-components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.