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

columnContextMenuConstrainTo not contrained to selected element #421

Open
guergana opened this issue Jun 14, 2024 · 0 comments
Open

columnContextMenuConstrainTo not contrained to selected element #421

guergana opened this issue Jun 14, 2024 · 0 comments

Comments

@guergana
Copy link

guergana commented Jun 14, 2024

  • Community edition 5.10.1

What you did:

I have the following code... which is targeting the element that I want, but when testing with a file with many columns, the submenu is not constrained to this element, but to the whole document.

  const dataGridElement = document.querySelector('.InovuaReactDataGrid')?.closest('.parent__element')

  return (
    <InovuaDatagrid
      dataSource={source}
      columns={columns}
      pagination={true}
      style={{ height: '100%', border: 'none' }}
      showColumnMenuLockOptions={false}
      showColumnMenuGroupOptions={false}
      columnContextMenuConstrainTo={dataGridElement}
      columnContextMenuPosition={"fixed"}
    />

PR where this can be reproduced: https://github.com/okfn/opendataeditor/pull/428/files

I have opted to use columnContextMenuConstrainTo={true} in the meantime since constraining to a selected Element is not working.

What happened:

image

Problem description:

columnContextMenuConstrainTo doesn't constrain the menu within the selected element when columnContextMenuPosition={"fixed"}

The result is the same if columnContextMenuConstrainTo is set to true or if it's set to the dataGridElement in my example. The columns submenu should be restrained to the top of the menu and not into the blue background.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant