icflorescu / icflorescu/mantine-datatable

Bug: TypeError when using `resizable` + `filter` in columns

Open
#731 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
102
PR merge metrics
No merged PRs in 30d

Description

Despite the error, resizing visually works, but the error is annoying and pollutes the console.


Additional Notes:
  • I have memoized the columns array using useMemo.
  • I'm not recreating the columns on every render.
  • This issue only happens when filter is present on a resizable column.
  • Your docs/demo don’t demonstrate this combination.
  • In non-SSR environments (pure CRA/Vite), error doesn’t occur. In Next.js (SSR + hydration), the error is reproducible.

Expected:

No error should appear during column resizing — even if a filter is provided.


Temporary workaround:

Remove either:

  • filter or
  • resizable
    from the problematic column — which is not ideal.

Please:
  • Fix the underlying DOM timing / ref handling issue.
  • Or provide a safer fallback in setColumnWidth() to prevent undefined.map() from crashing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating setColumnWidth and trace how resizable columns with filters obtain their DOM refs during Next.js SSR and hydration. Reproduce the filter-plus-resizable case, then verify resizing still works without an undefined.map() exception or console error.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.