[PropertyFieldOrder] When items is an empty array, component renders the text "0" #152
Closed
1 of 3 tasks
Labels
Milestone
Category
Version
1.14.0
Expected / Desired Behavior / Question
When passing an empty array to items, the control should render nothing under the label (Or, even nicer, some text stating there are no items)
Observed Behavior
When the items array is empty, the control renders the text "0" under the label.
Steps to Reproduce
Add the control and pass an empty array to items. Observe that the control renders the text "0" where the items would go.
Suggested Resolution
This is another issue of inappropriate use of a truthy/falsey check.
Relevant Code:
The appropriate check is actually made above on line 52. I remember react used to not render "0" when passed the length of an empty array, so I'm guessing this was written back then and just hasn't been updated.
The text was updated successfully, but these errors were encountered: