mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-12 13:00:26 +00:00
Allow column without accessor or id
This commit is contained in:
+5
-4
@@ -126,14 +126,15 @@ export default React.createClass({
|
||||
return dcol
|
||||
}
|
||||
|
||||
if (!dcol.accessor) {
|
||||
dcol.accessor = d => undefined
|
||||
}
|
||||
if (!dcol.id) {
|
||||
if (dcol.accessor && !dcol.id) {
|
||||
console.warn(dcol)
|
||||
throw new Error('A column id is required if using a non-string accessor for column above.')
|
||||
}
|
||||
|
||||
if (!dcol.accessor) {
|
||||
dcol.accessor = d => undefined
|
||||
}
|
||||
|
||||
return dcol
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user