Skip to content

Missing vertical spacing between global filter and table when showGlobalFilter is used without renderTopToolbarCustomActions #548

@nebu-ne

Description

@nebu-ne

mantine-react-table version

Version 2.0.0-beta.9

react & react-dom versions

19.1.1

Describe the bug and the steps to reproduce it

  • When a table uses showGlobalFilter: true in initialState but does not define renderTopToolbarCustomActions, there is no vertical spacing between the search input and the table body.

  • The top toolbar container conditionally applies position: relative !important only when renderTopToolbarCustomActions renders content. When undefined or empty, the container defaults to position: absolute, which causes the vertical padding to collapse.

  • Observed in 2.0.0-beta.9 and note that it may affect other versions as well

Minimal, Reproducible Example - (Optional, but Recommended)

  1. Create a table with showGlobalFilter: true in initialState
  2. Do NOT define renderTopToolbarCustomActions
  3. Observe missing vertical spacing between search input and table

Code example:

<MantineReactTable
  columns={columns}
  data={data}
  initialState={{
    showGlobalFilter: true
  }}
  // No renderTopToolbarCustomActions defined
/>


### Screenshots or Videos (Optional)

_No response_

### Do you intend to try to help solve this bug with your own PR?

None

### Terms

- [x] I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions