Skip to content

docs(Example): Fix warnings #599

Closed
@layershifter

Description

@layershifter

We have warnings in docs and test, they throw warnings in prop validation.

Docs

Menu

  • Complete

Warning: Failed prop type: Invalid prop link of type string supplied to Icon, expected boolean.
in Icon (created by Input)
in Input (created by TabularOnTop)
in div (created by MenuItem)
in MenuItem (created by TabularOnTop)
in div (created by MenuMenu)
in MenuMenu (created by TabularOnTop)
in div (created by Menu)
in Menu (created by TabularOnTop)
in div (created by TabularOnTop)
in TabularOnTop

Table

  • Complete

Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of Table. See https://fb.me/react-warning-keys for more information.
in TableRow (created by Table)
in Table (created by TableWarningShorthand)
in TableWarningShorthand

Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of TableRow. See https://fb.me/react-warning-keys for more information.
in TableCell (created by TableRow)
in TableRow (created by Table)
in thead (created by TableHeader)
in TableHeader (created by Table)
in table (created by Table)
in Table (created by TableWarningShorthand)
in TableWarningShorthand

Feed

  • Complete

Warning: Failed prop type: Prop children in FeedContent conflicts with props: date. They cannot be defined together, choose one or the other.
in FeedContent (created by ContentBlock)
in ContentBlock

Warning: Failed prop type: Prop date in FeedContent conflicts with props: children. They cannot be defined together, choose one or the other.
in FeedContent (created by ContentBlock)
in ContentBlock

Dropdown

  • Complete

Warning: Failed prop type: children prop in Dropdown requires props: text.
in Dropdown (created by DropdownTriggerExample)
in DropdownTriggerExample

Warning: Failed prop type: options prop in Dropdown requires props: selection.
in Dropdown (created by DropdownHeaderExample)
in DropdownHeaderExample

Test

Portal

  • Complete
✔ should call props.onUnmount() only once when portal closes and then is unmounted

ERROR: 'Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the ReactClass component.'
✔ should call props.onUnmount() only once when directly unmounting
ERROR: 'Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the ReactClass component.'
✔ should not call this.setState() if portal is unmounted
ERROR: 'Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the ReactClass component.'

Select

  • Complete

✔ is exported at the top level
ERROR: 'Warning: Failed prop type: selection prop in Dropdown requires props: options.
in Dropdown'

Grid

  • Complete

✔ adds numberToWord value to className
ERROR: 'Warning: Failed prop type: Invalid prop columns of value equal supplied to GridRow, expected one of ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,"one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen"].
in GridRow'

Menu

  • Complete

✔ renders children
ERROR: 'Warning: Exception thrown by hook while handling onSetChildren: Invariant Violation: Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (7 has parents 0 and 6).

Table

  • Complete

shorthand
✔ renders empty tbody with no shorthand
ERROR: 'Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of Table. See https://fb.me/react-warning-keys for more information.
in TableRow (created by Table)
in Table (created by Unknown)
in Unknown'
ERROR: 'Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of TableRow. See https://fb.me/react-warning-keys for more information.
in TableCell (created by TableRow)
in TableRow (created by Table)
in thead (created by TableHeader)
in TableHeader (created by Table)
in table (created by Table)
in Table (created by Unknown)
in Unknown'

TableRow

  • Complete
 ✔ does not add prop value to className

ERROR: 'Warning: validateDOMNesting(...): cannot appear as a child of

. See div > (unknown) > TableRow > tr.'

Button

  • Complete

✔ adds className icon
ERROR: 'Warning: Failed prop type: Given props { icon: "user" }: Prop children in Button conflicts with props: icon. They cannot be defined together, choose one or the other.
in Button'

Label

  • Complete

✔ is not included in className when not defined
ERROR: 'Warning: Failed prop type: empty prop in Label requires props: circular.
in Label'

Loader

  • Complete

✔ is not included in className when not defined
ERROR: 'Warning: Failed prop type: Invalid prop text supplied to Loader, expected a ReactNode.
in Loader'

Accordion

  • Complete

onTitleClick
✔ is called with (event, index)
ERROR: 'Warning: Failed prop type: Prop children in Accordion conflicts with props: panels. They cannot be defined together, choose one or the other.
in Accordion'
ERROR: 'Warning: Failed prop type: Prop panels in Accordion conflicts with props: children. They cannot be defined together, choose one or the other.
in Accordion'

Dropdown

  • Complete

✔ is tabbable
ERROR: 'Warning: Failed prop type: options prop in Dropdown requires props: selection.
in Dropdown'

trigger
✔ displays the trigger
ERROR: 'Warning: Failed prop type: Prop trigger in Dropdown conflicts with props: text. They cannot be defined together, choose one or the other.
in Dropdown'

  ✔ passes the name prop to the hidden select

ERROR: 'Warning: Failed prop type: Invalid prop value supplied to Dropdown.
in Dropdown'

Modal

  • Complete
    ✔ adds an inverted dimmer to the body

ERROR: 'Warning: Unknown props onClose, defaultOpen on

tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
in div (created by Modal)'

  ✔ is not called when the open prop changes to false

ERROR: 'Warning: Unknown props closeOnEscape, closeOnDocumentClick on

tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
in div (created by Modal)'
with configurable close behaviours, onClose

Search Input

Note: This warning is actually coming from the Input not setting onChange on a controlled input.

  • Complete

✔ closes the menu
ERROR: 'Warning: Failed form propType: You provided a value prop to a form field without an onChange handler. This will render a read-only field. If the field should be mutable use defaultValue. Otherwise, set either onChange or readOnly. Check the render method of Input.'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions