Skip to content

PropTypes.array and PropTypes.arrayOf handling with null #19647

@alexandesigner

Description

@alexandesigner
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When filtering an item that does not exist in the list (options), it is returning null and the .filter method is broken

Screen Shot 2020-02-10 at 10 58 24

Expected Behavior 🤔

The ideal would be to check if there are options and if it is an array if it is not going to return an empty array.

Steps to Reproduce 🕹

if you want to reproduce it directly, just go to https://carhoo.com.br/comprar and look for an item when filling out automatic or simple reproduction ... See https://codesandbox.io/s/tender-breeze-gj3zr

Your Environment 🌎

Tech Version
Material-UI v4.9.2
React v16.10.2
Browser Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalBehind-the-scenes enhancement. Formerly called “core”.scope: autocompleteChanges related to the autocomplete. This includes ComboBox.type: new featureExpand the scope of the product to solve a new problem.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions