Support have multiple same columns in one table
#218 opened on Feb 20, 2018
Description
I have run into an issue where I have two columns with different headings pointing to the same dataField. One of these columns is visible on desktop and has the full name and the other one is visible on mobile and contains an icon instead to cut down on space. The columns are made hidden and visible using the bootstrap classes 'visible-xs' and 'hidden-xs'.
It seems that the key for the header cells is based simply on the contents of the dataField element and in my case this throws and error.
For reference here is the full error message:
Encountered two children with the same key, 'status'. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version. in tr (created by Header) in thead (created by Header) in Header (created by BootstrapTable) in table (created by BootstrapTable) in div (created by BootstrapTable) in BootstrapTable (created by PaginationWrapper) in PaginationWrapper (created by SortWrapper) in SortWrapper (created by BootstrapTableContainer) in BootstrapTableContainer (created by StockListTile) in div (created by Row) in Row (created by StockListTile) in div (created by Col) in Col (created by StockListTile) in StockListTile (created by Connect(StockListTile)) in Connect(StockListTile) (created by ProjectPage) in div (created by Row) in Row (created by ProjectPage) in div (created by Grid) in Grid (created by ProjectPage) in div (created by ProjectPage) in div (created by ProjectPage) in div (created by ProjectPage) in ProjectPage (created by Connect(ProjectPage)) in Connect(ProjectPage) (created by LoadableComponent) in LoadableComponent (created by Route) in Route (created by routes) in Switch (created by routes) in routes (created by _default) in div (created by _default) in Router (created by BrowserRouter) in BrowserRouter (created by _default) in _default in Provider in AppContainer