jakezatecky / react-checkbox-tree

A simple and elegant checkbox tree for React.

Home Page:https://jakezatecky.github.io/react-checkbox-tree/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unique key props

vikassingh1994 opened this issue · comments

index.js:1 Warning: Each child in a list should have a unique "key" prop.

Check the render method of a. See https://fb.me/react-warning-keys for more information.
in Gi (created by a)
in a (created by s)
in ol (created by s)
in div (created by s)
in s (at Stores.js:146)
in div (at Stores.js:145)
in div (at Stores.js:132)
in Stores (created by WithStyles(Stores))
in WithStyles(Stores) (at PosLeftDrawer.js:679)
in div (created by Transition)
in div (created by Transition)
in div (created by Transition)
in Transition (created by ForwardRef(Collapse))
in ForwardRef(Collapse) (created by WithStyles(ForwardRef(Collapse)))
in WithStyles(ForwardRef(Collapse)) (at PosLeftDrawer.js:663)
in ul (created by ForwardRef(List))
in ForwardRef(List) (created by WithStyles(ForwardRef(List)))
in WithStyles(ForwardRef(List)) (at PosLeftDrawer.js:593)
in div (created by ForwardRef(Paper))
in ForwardRef(Paper) (created by WithStyles(ForwardRef(Paper)))
in WithStyles(ForwardRef(Paper)) (created by Transition)
in Transition (created by ForwardRef(Slide))
in ForwardRef(Slide) (created by ForwardRef(Drawer))
in div (created by ForwardRef(Drawer))
in ForwardRef(Drawer) (created by WithStyles(ForwardRef(Drawer)))
in WithStyles(ForwardRef(Drawer)) (at PosLeftDrawer.js:578)
in PosLeftDrawer (created by WithStyles(PosLeftDrawer))
in WithStyles(PosLeftDrawer) (at Layout.js:406)
in div (at Layout.js:393)
in Route (created by ProtectedRoute)
in ProtectedRoute (created by ProtectedRoute$1)
in ProtectedRoute$1 (at Layout.js:383)
in Layout (created by WithStyles(Layout))
in WithStyles(Layout) (created by ConnectFunction)
in ConnectFunction (at App.js:29)
in Route (at App.js:26)
in Switch (at App.js:24)
in Router (created by BrowserRouter)
in BrowserRouter (at App.js:22)
in Main (at App.js:52)
in Route (at App.js:52)
in Switch (at App.js:51)
in Router (created by BrowserRouter)
in BrowserRouter (at App.js:50)
in CssBaseline (at App.js:49)
in ThemeProvider (at App.js:48)
in Authentication
in Authentication (created by AuthenticationProvider)
in AuthenticationProvider (at App.js:47)
in App (at src/index.js:33)
in Provider (at src/index.js:32)

As specified in the README, all nodes must have a unique key value. This is due to supporting key values in the checked and expanded properties as well as for performance reasons.

[{"value":"All Registers","label":"All Registers","children":[{"value":"0046","label":"POS-46 Optical"},{"value":"0075","label":"POS-75 Lane 5"}]}]
Is something Wrong with this DATA? @jakezatecky

Nothing seems wrong with those values, but I suspect nodes violating the unique value constraint exist at some point. If you can recreate the issue in a small demo environment, like in CodePen, then I can look at the issue further.

This started happening for us when we updated to 1.7.2 from 1.6. We had duplicate nodes under different "categories", which worked fine before. We just removed the duplicate nodes.