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

DataTable: editMode="cell" and Dropdown z-Index issue #5320

Closed
CRC32EX opened this issue Nov 15, 2023 · 19 comments · Fixed by #5373
Closed

DataTable: editMode="cell" and Dropdown z-Index issue #5320

CRC32EX opened this issue Nov 15, 2023 · 19 comments · Fixed by #5373
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@CRC32EX
Copy link

CRC32EX commented Nov 15, 2023

Describe the bug

Required editMode="cell" and Dropdown to have appendTo="self"

https://stackblitz.com/edit/vitejs-vite-l8d3y6?file=src%2FApp.tsx

A

Dropdown disappear when scroll

B (resizableColumns)

Dropdown disappear all times

Reproducer

A

https://stackblitz.com/edit/vitejs-vite-aobqhu?file=src%2FApp.tsx

B (resizableColumns)

https://stackblitz.com/edit/vitejs-vite-dja1u6?file=src%2FApp.tsx

PrimeReact version

10.0.9

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Chrome Latest(119.0.6045.124)

Steps to reproduce the behavior

No response

Expected behavior

No response

Ref

#2666

@CRC32EX CRC32EX added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 15, 2023
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 15, 2023
@artimath
Copy link

I was able to finally resolve by add overflow visible to the datatable wrapper via passthrough.


<DataTable
        pt={{ wrapper: { style: { overflow: "visible" } } }}
        value={normalizedData}
        tableStyle={{ minWidth: "3rem" }}
        paginator
        paginatorClassName="z-0 relative"
        showGridlines

@melloware melloware added Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team and removed Type: Bug Issue contains a defect related to a specific component. labels Nov 21, 2023
@melloware
Copy link
Member

Thanks. Marked your solution as a good workaround

@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2023
@CRC32EX
Copy link
Author

CRC32EX commented Nov 21, 2023

This CSS is not solution.
paginator horizontal scroll is disabled by overflow: "visible".

In addition, B (resizableColumns) have still same problem.
Can't solve with This CSS.

@melloware Re-open this issues please.

@melloware
Copy link
Member

It looks like @artimath also adds "relative" to the paginatorClassName I assumed that was to handle the paginator issue?

@CRC32EX
Copy link
Author

CRC32EX commented Nov 21, 2023

z-0 and relative is not defined by default.
it's self defined by @artimath.
Please tell me z-0 and relative CSS @artimath

I can't use pt attribute stackblitz.com. (I don't know why)
So I take a video.
https://github.com/primefaces/primereact/assets/25629617/590691ac-72ef-419c-b61a-2a23858b6202

@melloware
Copy link
Member

@CRC32EX
Copy link
Author

CRC32EX commented Nov 21, 2023

@melloware Thank you.
I add reproducer.

scrollable not working

Reproducer

  • Current beahvior
    Invalid width. scrollbar disappear.
    image

  • Expected behavior
    image

resizableColumns not working

Reproducer

  • Current behavior
    image

  • Expected behavior
    image

@melloware
Copy link
Member

melloware commented Nov 21, 2023

I guess the question is why do you want the dropdown to stay open when they scroll the page? According to ARIA standard when you are using the scrollbar of the page the dropdown should close as you are "no longer interacting with the dropdown"????

So to me its the correct behavior?

@CRC32EX
Copy link
Author

CRC32EX commented Nov 21, 2023

Are you talking about this GIF?
I want choose group3 but I can't see it.
I have to scroll down.

@melloware
Copy link
Member

OK but just remove appendTo="self" See: https://stackblitz.com/edit/vitejs-vite-nuvmev?file=src%2FApp.tsx its trapping it INSIDE the table.

Does that not work for you?

@CRC32EX
Copy link
Author

CRC32EX commented Nov 21, 2023

I have to add appendTo="self"
Because of this #2666

@melloware
Copy link
Member

melloware commented Nov 21, 2023

But my reproducer is working fine. it lets you select the proper dropdown item? Can you please try my reproducer and tell me what is not working? It doesn't need #2666 ?

@CRC32EX
Copy link
Author

CRC32EX commented Nov 21, 2023

But my reproducer is working fine.

Yes it's working

But, I'm fixed code.
This case not working.
I have to add appendTo="self"

https://stackblitz.com/edit/vitejs-vite-l8d3y6?file=src%2FApp.tsx

When i add appendTo="self" then, design is broken.

@melloware
Copy link
Member

By why do you need appendTo="self" when I don't need that in my reproducer is my question?

@CRC32EX
Copy link
Author

CRC32EX commented Nov 21, 2023

Your reproducer is not implemented cell editor.
So, I implement cell editor to your code.
This is code diff.
https://gist.github.com/CRC32EX/1ea1febe8d3a0461296eb0060c74726a/revisions

editMode="cell" has Dropdown bug.
According to this issue #2666, WORKAROUND is add appendTo="self"
So, I have to add appendTo="self"

This issues is reproducable with uncomment App.tsx line 28 appendTo="self"
https://stackblitz.com/edit/vitejs-vite-l8d3y6?file=src%2FApp.tsx

@melloware melloware changed the title DataTable: Dropdown disappear DataTable: Cell Edit and Dropdown z-Index Nov 21, 2023
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team labels Nov 21, 2023
@melloware
Copy link
Member

@CRC32EX then I guess I am unclear why editMode="cell" was not in your original reproducer? When that is the real bug?

@melloware melloware reopened this Nov 21, 2023
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 21, 2023
@melloware melloware changed the title DataTable: Cell Edit and Dropdown z-Index DataTable: Cell editor and Dropdown z-Index issue Nov 21, 2023
@melloware melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 21, 2023
@melloware melloware changed the title DataTable: Cell editor and Dropdown z-Index issue DataTable: editMode="cell" and Dropdown z-Index issue Nov 21, 2023
@CRC32EX
Copy link
Author

CRC32EX commented Nov 21, 2023

I provided trimmed code for readable.
I thought it is reproducable, but it is not.

This is my fault, I'm sorry.

I'm should not have do that.
When I found other issues, l will provide full code, with out trim.

@melloware
Copy link
Member

OK re-opened and I updated the details.

@melloware
Copy link
Member

Fixed for next release so you will be able to remove append and it will just work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants