Skip to content

Commit d8ca9b7

Browse files
authored
Revert "adds passAdjacentKeyFields option (#682)" (#716)
This reverts commit 39f8840.
1 parent dff0f86 commit d8ca9b7

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ When the breakpoint is reached the column will be hidden. These are the built-in
168168
| noTableHead | bool | no | false | hides the the sort columns and titles (TableHead) - this will obviously negate sorting |
169169
| persistTableHead | bool | no | | Show the table head (columns) even when `progressPending` is true. Note that the `noTableHead` will always hide the table head (columns) even when using `persistTableHead` |
170170
| direction | string | no | auto | Accepts: `ltr, rtl, or auto`. When set to `auto` (default), RDT will attempt to detect direction by checking the HTML and DIV tags. For cases where you need to force rtl, or ltr just set this option manually (i.e. SSR) |
171-
| passAdjacentKeyFields | bool | no | false | Adds `prevKeyField` and `nextKeyField` properties to the row object, containing the keyField value for the adjacent rows, if any |
172171

173172
#### Row Selection
174173

src/DataTable/DataTable.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ const DataTable = memo(({
103103
theme,
104104
customStyles,
105105
direction,
106-
passAdjacentKeyFields,
107106
}) => {
108107
const initialState = {
109108
allSelected: false,
@@ -389,12 +388,6 @@ const DataTable = memo(({
389388
&& expandableRowDisabled
390389
&& expandableRowDisabled(row);
391390

392-
393-
if ( passAdjacentKeyFields ) {
394-
row.prevKeyField = typeof(calculatedRows[i-1]) != "undefined" ? calculatedRows[i-1][keyField] : false;
395-
row.nextKeyField = typeof(calculatedRows[i+1]) != "undefined" ? calculatedRows[i+1][keyField] : false;
396-
}
397-
398391
return (
399392
<TableRow
400393
id={id}

0 commit comments

Comments
 (0)