react-data-table-component icon indicating copy to clipboard operation
react-data-table-component copied to clipboard

When I hover table cell popup shows but Z-index doesnt work

Open emreertoprak opened this issue 2 years ago • 5 comments

##Problem

When I hover table cell popup shows but Z-index doesnt work.

I gave 99999 z index to cell it shows on dev tools but as you can see below popup doesnt go up over row.

Expected behavior

I want the popup to indexed at top

1 2

these are my codes

 <DataTableBox
      noHeader={true}
      fixedHeader={true}
      striped={true}
      pagination={true}
      paginationPerPage={50}
      paginationRowsPerPageOptions={[10, 15, 20, 25, 30, 50]}
      paginationServer={true}
      responsive={true}
      sortServer={true}
      noDataComponent={
        <Box sx={{ height: 512 }}>
          <NoRecordFound />
        </Box>
      }
      customStyles={{
        tableWrapper: {
          style: {},
        },
        table: {
          style: {
            maxHeight: "calc(100vh - 80px - 70px)",
            overflowY: "inherit",
            minHeight: "400px",
            zIndex: 1,
          },
        },
        headRow: {
          style: {
            minHeight: 32,
            ...rowBorderBottom,
          },
        },
        headCells: {
          style: {
            fontWeight: "bold",
            paddingRight: 0,
          },
        },
        cells: {
          style: {
            minHeight: 32,
            paddingRight: 0,
            ...cellsStyle,
          },
        },
        rows: {
          style: {
            zIndex: 99999,
            minHeight: 132,
            borderBottomStyle: "solid",
            borderBottomColor: "rgba(0,0,0,.12)",
            borderBottomWidth: 1,
            ...rowStyle,
            ...rowBorderBottom,
            ":not(:last-of-type)": { ...rowBorderBottom },
          },
        },
        pagination: {
          style: {
            borderTop: "none",
          },
        },
      }}
      progressComponent={
        <LoadingPlaceholder
          isLoading={true}
          style={{ height: 512 }}
          message={progressComponentMessage}
        />
      }
      {...otherProps}
    />
  );
`};`

emreertoprak avatar Apr 06 '22 14:04 emreertoprak

Hi. I'm having the same issue. Where I had to place a dropdown inside the table and it gets hidden due to the height of the table. Did you manage to solve the issue?

NayeerBM avatar Apr 07 '22 06:04 NayeerBM

It is not about z-index you need to give position fixed to your popup element.

safaksonmez avatar Apr 07 '22 07:04 safaksonmez

i had the same issue. no answers yet. https://github.com/jbetancur/react-data-table-component/issues/926#issuecomment-952797703

Fir-3 avatar Apr 29 '22 08:04 Fir-3

It is not about z-index you need to give position fixed to your popup element.

If the table is scrollable, fixed position will cause the drop-down to go down image

to-fuu avatar May 22 '22 17:05 to-fuu

any news about this?

found that the issue is related to these lines: https://github.com/jbetancur/react-data-table-component/blob/a881779693a484fed221f67e618e2946f1d104f2/src/DataTable/ResponsiveWrapper.tsx#L23 https://github.com/jbetancur/react-data-table-component/blob/a881779693a484fed221f67e618e2946f1d104f2/src/DataTable/ResponsiveWrapper.tsx#L20

both overflow-x and overflow-y should be visible in order to not hide the dropdowns, popups or whatever you open up in the cell.

nicomfe avatar Sep 12 '22 10:09 nicomfe