Skip to content

Using TableView at 90% zoom level triggers a re-render loop and errors #5357

Closed
@JasonKaz

Description

@JasonKaz

Provide a general summary of the issue here

This issue may be 2 different errors, see here.

Original issue here:
When using the TableView component without a height it can sometimes cause a re-render loop which React catches and throws an error.
You can see this behavior in this example: https://codesandbox.io/s/react-spectrum-table-react-error-185-hx7vsw?file=/src/App.js

In that example it is erroring upon filter but we have many reports of customers not even being able to render the table at all. It must be some combination of data within the table, browser, and window size because we cannot replicate the error being thrown in that case.

The CodeSandbox is a typical use case for us using TableViews. We do not set a height or maxHeight because we want the tables to expand and contract depending on the row count and height. Setting a maxHeight would work for us, but we have confirmed that maxHeight alone does not prevent this error from being thrown.

🤔 Expected Behavior?

The table does not throw an error when height or maxHeight are missing.

😯 Current Behavior

It throws an error and crashes the application, or throws an error in an Error Boundary if one is used.

Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

💁 Possible Solution

Applying a height to the TableView fixes it, but in doing so degrades our user experience.

🔦 Context

No response

🖥️ Steps to Reproduce

Reproduction steps are listed in the following: https://codesandbox.io/s/react-spectrum-table-react-error-185-hx7vsw?file=/src/App.js

Version

3.31.0

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

If other, please specify.

No response

What operating system are you using?

OSX

🧢 Your Company/Team

Adobe/Admin Console

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions