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

Fix <SimpleList> throws an error when no data in standalone mode #10313

Merged
merged 1 commit into from
Oct 29, 2024

Commits on Oct 29, 2024

  1. Fix <SimpleList> throws an error when no data in standalone mode

    ## Problem
    
    Since #10184, published in 5.2.0, `<SimpleList>` and `<Datagrid>` throw an error when used in standalone mode (i.e., outside of a ListContext) with an empty `data`.
    
    ## Solution
    
    The problem comes from `ListNoResults`, which reads the `ListContext` to determine if there is an active filter.
    
    ## Solution
    
    Use the alternative `useListContextWithProps` instead of `useListContext`.
    fzaninotto committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    a510725 View commit details
    Browse the repository at this point in the history