@tanstack/table-core 8.5.8 → 8.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,8 +16,13 @@ var utils = require('../utils.js');
16
16
 
17
17
  function getExpandedRowModel() {
18
18
  return table => utils.memo(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {
19
- if (!rowModel.rows.length || // Do not expand if rows are not included in pagination
20
- !paginateExpandedRows || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
19
+ if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
20
+ return rowModel;
21
+ }
22
+
23
+ if (!paginateExpandedRows) {
24
+ // Only expand rows at this point if they are being paginated
25
+ console.log(rowModel.rows);
21
26
  return rowModel;
22
27
  }
23
28
 
@@ -31,7 +36,7 @@ function getExpandedRowModel() {
31
36
  }
32
37
  });
33
38
  }
34
- function expandRows(rowModel, table) {
39
+ function expandRows(rowModel) {
35
40
  const expandedRows = [];
36
41
 
37
42
  const handleRow = row => {
@@ -1 +1 @@
1
- {"version":3,"file":"getExpandedRowModel.js","sources":["../../../src/utils/getExpandedRowModel.ts"],"sourcesContent":["import { Table, Row, RowModel, RowData } from '../types'\nimport { memo } from '../utils'\n\nexport function getExpandedRowModel<TData extends RowData>(): (\n table: Table<TData>\n) => () => RowModel<TData> {\n return table =>\n memo(\n () => [\n table.getState().expanded,\n table.getPreExpandedRowModel(),\n table.options.paginateExpandedRows,\n ],\n (expanded, rowModel, paginateExpandedRows) => {\n if (\n !rowModel.rows.length ||\n // Do not expand if rows are not included in pagination\n !paginateExpandedRows ||\n (expanded !== true && !Object.keys(expanded ?? {}).length)\n ) {\n return rowModel\n }\n\n return expandRows(rowModel, table)\n },\n {\n key: process.env.NODE_ENV === 'development' && 'getExpandedRowModel',\n debug: () => table.options.debugAll ?? table.options.debugTable,\n }\n )\n}\n\nexport function expandRows<TData extends RowData>(\n rowModel: RowModel<TData>,\n table: Table<TData>\n) {\n const expandedRows: Row<TData>[] = []\n\n const handleRow = (row: Row<TData>) => {\n expandedRows.push(row)\n\n if (row.subRows?.length && row.getIsExpanded()) {\n row.subRows.forEach(handleRow)\n }\n }\n\n rowModel.rows.forEach(handleRow)\n\n return {\n rows: expandedRows,\n flatRows: rowModel.flatRows,\n rowsById: rowModel.rowsById,\n }\n}\n"],"names":["getExpandedRowModel","table","memo","getState","expanded","getPreExpandedRowModel","options","paginateExpandedRows","rowModel","rows","length","Object","keys","expandRows","key","process","env","NODE_ENV","debug","debugAll","debugTable","expandedRows","handleRow","row","push","subRows","getIsExpanded","forEach","flatRows","rowsById"],"mappings":";;;;;;;;;;;;;;;;AAGO,SAASA,mBAAT,GAEoB;AACzB,EAAA,OAAOC,KAAK,IACVC,UAAI,CACF,MAAM,CACJD,KAAK,CAACE,QAAN,EAAA,CAAiBC,QADb,EAEJH,KAAK,CAACI,sBAAN,EAFI,EAGJJ,KAAK,CAACK,OAAN,CAAcC,oBAHV,CADJ,EAMF,CAACH,QAAD,EAAWI,QAAX,EAAqBD,oBAArB,KAA8C;AAC5C,IAAA,IACE,CAACC,QAAQ,CAACC,IAAT,CAAcC,MAAf;AAEA,IAAA,CAACH,oBAFD,IAGCH,QAAQ,KAAK,IAAb,IAAqB,CAACO,MAAM,CAACC,IAAP,CAAYR,QAAZ,IAAYA,IAAAA,GAAAA,QAAZ,GAAwB,EAAxB,CAAA,CAA4BM,MAJrD,EAKE;AACA,MAAA,OAAOF,QAAP,CAAA;AACD,KAAA;;AAED,IAAA,OAAOK,UAAU,CAACL,QAAD,CAAjB,CAAA;AACD,GAjBC,EAkBF;IACEM,GAAG,EAAEC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,aAAzB,IAA0C,qBADjD;AAEEC,IAAAA,KAAK,EAAE,MAAA;AAAA,MAAA,IAAA,qBAAA,CAAA;;MAAA,OAAMjB,CAAAA,qBAAAA,GAAAA,KAAK,CAACK,OAAN,CAAca,QAApB,oCAAgClB,KAAK,CAACK,OAAN,CAAcc,UAA9C,CAAA;AAAA,KAAA;AAFT,GAlBE,CADN,CAAA;AAwBD,CAAA;AAEM,SAASP,UAAT,CACLL,QADK,EAELP,KAFK,EAGL;EACA,MAAMoB,YAA0B,GAAG,EAAnC,CAAA;;EAEA,MAAMC,SAAS,GAAIC,GAAD,IAAqB;AAAA,IAAA,IAAA,YAAA,CAAA;;IACrCF,YAAY,CAACG,IAAb,CAAkBD,GAAlB,CAAA,CAAA;;IAEA,IAAI,CAAA,YAAA,GAAAA,GAAG,CAACE,OAAJ,KAAA,IAAA,IAAA,YAAA,CAAaf,MAAb,IAAuBa,GAAG,CAACG,aAAJ,EAA3B,EAAgD;AAC9CH,MAAAA,GAAG,CAACE,OAAJ,CAAYE,OAAZ,CAAoBL,SAApB,CAAA,CAAA;AACD,KAAA;GALH,CAAA;;AAQAd,EAAAA,QAAQ,CAACC,IAAT,CAAckB,OAAd,CAAsBL,SAAtB,CAAA,CAAA;EAEA,OAAO;AACLb,IAAAA,IAAI,EAAEY,YADD;IAELO,QAAQ,EAAEpB,QAAQ,CAACoB,QAFd;IAGLC,QAAQ,EAAErB,QAAQ,CAACqB,QAAAA;GAHrB,CAAA;AAKD;;;;;"}
1
+ {"version":3,"file":"getExpandedRowModel.js","sources":["../../../src/utils/getExpandedRowModel.ts"],"sourcesContent":["import { Table, Row, RowModel, RowData } from '../types'\nimport { memo } from '../utils'\n\nexport function getExpandedRowModel<TData extends RowData>(): (\n table: Table<TData>\n) => () => RowModel<TData> {\n return table =>\n memo(\n () => [\n table.getState().expanded,\n table.getPreExpandedRowModel(),\n table.options.paginateExpandedRows,\n ],\n (expanded, rowModel, paginateExpandedRows) => {\n if (\n !rowModel.rows.length ||\n (expanded !== true && !Object.keys(expanded ?? {}).length)\n ) {\n return rowModel\n }\n\n if (!paginateExpandedRows) {\n // Only expand rows at this point if they are being paginated\n console.log(rowModel.rows)\n return rowModel\n }\n\n return expandRows(rowModel)\n },\n {\n key: process.env.NODE_ENV === 'development' && 'getExpandedRowModel',\n debug: () => table.options.debugAll ?? table.options.debugTable,\n }\n )\n}\n\nexport function expandRows<TData extends RowData>(rowModel: RowModel<TData>) {\n const expandedRows: Row<TData>[] = []\n\n const handleRow = (row: Row<TData>) => {\n expandedRows.push(row)\n\n if (row.subRows?.length && row.getIsExpanded()) {\n row.subRows.forEach(handleRow)\n }\n }\n\n rowModel.rows.forEach(handleRow)\n\n return {\n rows: expandedRows,\n flatRows: rowModel.flatRows,\n rowsById: rowModel.rowsById,\n }\n}\n"],"names":["getExpandedRowModel","table","memo","getState","expanded","getPreExpandedRowModel","options","paginateExpandedRows","rowModel","rows","length","Object","keys","console","log","expandRows","key","process","env","NODE_ENV","debug","debugAll","debugTable","expandedRows","handleRow","row","push","subRows","getIsExpanded","forEach","flatRows","rowsById"],"mappings":";;;;;;;;;;;;;;;;AAGO,SAASA,mBAAT,GAEoB;AACzB,EAAA,OAAOC,KAAK,IACVC,UAAI,CACF,MAAM,CACJD,KAAK,CAACE,QAAN,EAAA,CAAiBC,QADb,EAEJH,KAAK,CAACI,sBAAN,EAFI,EAGJJ,KAAK,CAACK,OAAN,CAAcC,oBAHV,CADJ,EAMF,CAACH,QAAD,EAAWI,QAAX,EAAqBD,oBAArB,KAA8C;IAC5C,IACE,CAACC,QAAQ,CAACC,IAAT,CAAcC,MAAf,IACCN,QAAQ,KAAK,IAAb,IAAqB,CAACO,MAAM,CAACC,IAAP,CAAYR,QAAZ,IAAA,IAAA,GAAYA,QAAZ,GAAwB,EAAxB,CAA4BM,CAAAA,MAFrD,EAGE;AACA,MAAA,OAAOF,QAAP,CAAA;AACD,KAAA;;IAED,IAAI,CAACD,oBAAL,EAA2B;AACzB;AACAM,MAAAA,OAAO,CAACC,GAAR,CAAYN,QAAQ,CAACC,IAArB,CAAA,CAAA;AACA,MAAA,OAAOD,QAAP,CAAA;AACD,KAAA;;IAED,OAAOO,UAAU,CAACP,QAAD,CAAjB,CAAA;AACD,GArBC,EAsBF;IACEQ,GAAG,EAAEC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,aAAzB,IAA0C,qBADjD;AAEEC,IAAAA,KAAK,EAAE,MAAA;AAAA,MAAA,IAAA,qBAAA,CAAA;;MAAA,OAAMnB,CAAAA,qBAAAA,GAAAA,KAAK,CAACK,OAAN,CAAce,QAApB,oCAAgCpB,KAAK,CAACK,OAAN,CAAcgB,UAA9C,CAAA;AAAA,KAAA;AAFT,GAtBE,CADN,CAAA;AA4BD,CAAA;AAEM,SAASP,UAAT,CAA2CP,QAA3C,EAAsE;EAC3E,MAAMe,YAA0B,GAAG,EAAnC,CAAA;;EAEA,MAAMC,SAAS,GAAIC,GAAD,IAAqB;AAAA,IAAA,IAAA,YAAA,CAAA;;IACrCF,YAAY,CAACG,IAAb,CAAkBD,GAAlB,CAAA,CAAA;;IAEA,IAAI,CAAA,YAAA,GAAAA,GAAG,CAACE,OAAJ,KAAA,IAAA,IAAA,YAAA,CAAajB,MAAb,IAAuBe,GAAG,CAACG,aAAJ,EAA3B,EAAgD;AAC9CH,MAAAA,GAAG,CAACE,OAAJ,CAAYE,OAAZ,CAAoBL,SAApB,CAAA,CAAA;AACD,KAAA;GALH,CAAA;;AAQAhB,EAAAA,QAAQ,CAACC,IAAT,CAAcoB,OAAd,CAAsBL,SAAtB,CAAA,CAAA;EAEA,OAAO;AACLf,IAAAA,IAAI,EAAEc,YADD;IAELO,QAAQ,EAAEtB,QAAQ,CAACsB,QAFd;IAGLC,QAAQ,EAAEvB,QAAQ,CAACuB,QAAAA;GAHrB,CAAA;AAKD;;;;;"}
@@ -16,7 +16,7 @@ var utils = require('../utils.js');
16
16
  var getExpandedRowModel = require('./getExpandedRowModel.js');
17
17
 
18
18
  function getPaginationRowModel(opts) {
19
- return table => utils.memo(() => [table.getState().pagination, table.getPrePaginationRowModel()], (pagination, rowModel) => {
19
+ return table => utils.memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {
20
20
  if (!rowModel.rows.length) {
21
21
  return rowModel;
22
22
  }
@@ -49,6 +49,7 @@ function getPaginationRowModel(opts) {
49
49
  };
50
50
  }
51
51
 
52
+ console.log(paginatedRowModel.rows);
52
53
  paginatedRowModel.flatRows = [];
53
54
 
54
55
  const handleRow = row => {
@@ -1 +1 @@
1
- {"version":3,"file":"getPaginationRowModel.js","sources":["../../../src/utils/getPaginationRowModel.ts"],"sourcesContent":["import { Table, RowModel, Row, RowData } from '../types'\nimport { memo } from '../utils'\nimport { expandRows } from './getExpandedRowModel'\n\nexport function getPaginationRowModel<TData extends RowData>(opts?: {\n initialSync: boolean\n}): (table: Table<TData>) => () => RowModel<TData> {\n return table =>\n memo(\n () => [table.getState().pagination, table.getPrePaginationRowModel()],\n (pagination, rowModel) => {\n if (!rowModel.rows.length) {\n return rowModel\n }\n\n const { pageSize, pageIndex } = pagination\n let { rows, flatRows, rowsById } = rowModel\n const pageStart = pageSize * pageIndex\n const pageEnd = pageStart + pageSize\n\n rows = rows.slice(pageStart, pageEnd)\n\n let paginatedRowModel: RowModel<TData>\n\n if (!table.options.paginateExpandedRows) {\n paginatedRowModel = expandRows(\n {\n rows,\n flatRows,\n rowsById,\n },\n table\n )\n } else {\n paginatedRowModel = {\n rows,\n flatRows,\n rowsById,\n }\n }\n\n paginatedRowModel.flatRows = []\n\n const handleRow = (row: Row<TData>) => {\n paginatedRowModel.flatRows.push(row)\n if (row.subRows.length) {\n row.subRows.forEach(handleRow)\n }\n }\n\n paginatedRowModel.rows.forEach(handleRow)\n\n return paginatedRowModel\n },\n {\n key: process.env.NODE_ENV === 'development' && 'getPaginationRowModel',\n debug: () => table.options.debugAll ?? table.options.debugTable,\n }\n )\n}\n"],"names":["getPaginationRowModel","opts","table","memo","getState","pagination","getPrePaginationRowModel","rowModel","rows","length","pageSize","pageIndex","flatRows","rowsById","pageStart","pageEnd","slice","paginatedRowModel","options","paginateExpandedRows","expandRows","handleRow","row","push","subRows","forEach","key","process","env","NODE_ENV","debug","debugAll","debugTable"],"mappings":";;;;;;;;;;;;;;;;;AAIO,SAASA,qBAAT,CAAsDC,IAAtD,EAE4C;EACjD,OAAOC,KAAK,IACVC,UAAI,CACF,MAAM,CAACD,KAAK,CAACE,QAAN,EAAiBC,CAAAA,UAAlB,EAA8BH,KAAK,CAACI,wBAAN,EAA9B,CADJ,EAEF,CAACD,UAAD,EAAaE,QAAb,KAA0B;AACxB,IAAA,IAAI,CAACA,QAAQ,CAACC,IAAT,CAAcC,MAAnB,EAA2B;AACzB,MAAA,OAAOF,QAAP,CAAA;AACD,KAAA;;IAED,MAAM;MAAEG,QAAF;AAAYC,MAAAA,SAAAA;AAAZ,KAAA,GAA0BN,UAAhC,CAAA;IACA,IAAI;MAAEG,IAAF;MAAQI,QAAR;AAAkBC,MAAAA,QAAAA;AAAlB,KAAA,GAA+BN,QAAnC,CAAA;AACA,IAAA,MAAMO,SAAS,GAAGJ,QAAQ,GAAGC,SAA7B,CAAA;AACA,IAAA,MAAMI,OAAO,GAAGD,SAAS,GAAGJ,QAA5B,CAAA;IAEAF,IAAI,GAAGA,IAAI,CAACQ,KAAL,CAAWF,SAAX,EAAsBC,OAAtB,CAAP,CAAA;AAEA,IAAA,IAAIE,iBAAJ,CAAA;;AAEA,IAAA,IAAI,CAACf,KAAK,CAACgB,OAAN,CAAcC,oBAAnB,EAAyC;MACvCF,iBAAiB,GAAGG,8BAAU,CAC5B;QACEZ,IADF;QAEEI,QAFF;AAGEC,QAAAA,QAAAA;OAJ0B,CAA9B,CAAA;AAQD,KATD,MASO;AACLI,MAAAA,iBAAiB,GAAG;QAClBT,IADkB;QAElBI,QAFkB;AAGlBC,QAAAA,QAAAA;OAHF,CAAA;AAKD,KAAA;;IAEDI,iBAAiB,CAACL,QAAlB,GAA6B,EAA7B,CAAA;;IAEA,MAAMS,SAAS,GAAIC,GAAD,IAAqB;AACrCL,MAAAA,iBAAiB,CAACL,QAAlB,CAA2BW,IAA3B,CAAgCD,GAAhC,CAAA,CAAA;;AACA,MAAA,IAAIA,GAAG,CAACE,OAAJ,CAAYf,MAAhB,EAAwB;AACtBa,QAAAA,GAAG,CAACE,OAAJ,CAAYC,OAAZ,CAAoBJ,SAApB,CAAA,CAAA;AACD,OAAA;KAJH,CAAA;;AAOAJ,IAAAA,iBAAiB,CAACT,IAAlB,CAAuBiB,OAAvB,CAA+BJ,SAA/B,CAAA,CAAA;AAEA,IAAA,OAAOJ,iBAAP,CAAA;AACD,GA7CC,EA8CF;IACES,GAAG,EAAEC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,aAAzB,IAA0C,uBADjD;AAEEC,IAAAA,KAAK,EAAE,MAAA;AAAA,MAAA,IAAA,qBAAA,CAAA;;MAAA,OAAM5B,CAAAA,qBAAAA,GAAAA,KAAK,CAACgB,OAAN,CAAca,QAApB,oCAAgC7B,KAAK,CAACgB,OAAN,CAAcc,UAA9C,CAAA;AAAA,KAAA;AAFT,GA9CE,CADN,CAAA;AAoDD;;;;"}
1
+ {"version":3,"file":"getPaginationRowModel.js","sources":["../../../src/utils/getPaginationRowModel.ts"],"sourcesContent":["import { Table, RowModel, Row, RowData } from '../types'\nimport { memo } from '../utils'\nimport { expandRows } from './getExpandedRowModel'\n\nexport function getPaginationRowModel<TData extends RowData>(opts?: {\n initialSync: boolean\n}): (table: Table<TData>) => () => RowModel<TData> {\n return table =>\n memo(\n () => [\n table.getState().pagination,\n table.getPrePaginationRowModel(),\n table.options.paginateExpandedRows\n ? undefined\n : table.getState().expanded,\n ],\n (pagination, rowModel) => {\n if (!rowModel.rows.length) {\n return rowModel\n }\n\n const { pageSize, pageIndex } = pagination\n let { rows, flatRows, rowsById } = rowModel\n const pageStart = pageSize * pageIndex\n const pageEnd = pageStart + pageSize\n\n rows = rows.slice(pageStart, pageEnd)\n\n let paginatedRowModel: RowModel<TData>\n\n if (!table.options.paginateExpandedRows) {\n paginatedRowModel = expandRows({\n rows,\n flatRows,\n rowsById,\n })\n } else {\n paginatedRowModel = {\n rows,\n flatRows,\n rowsById,\n }\n }\n\n console.log(paginatedRowModel.rows)\n\n paginatedRowModel.flatRows = []\n\n const handleRow = (row: Row<TData>) => {\n paginatedRowModel.flatRows.push(row)\n if (row.subRows.length) {\n row.subRows.forEach(handleRow)\n }\n }\n\n paginatedRowModel.rows.forEach(handleRow)\n\n return paginatedRowModel\n },\n {\n key: process.env.NODE_ENV === 'development' && 'getPaginationRowModel',\n debug: () => table.options.debugAll ?? table.options.debugTable,\n }\n )\n}\n"],"names":["getPaginationRowModel","opts","table","memo","getState","pagination","getPrePaginationRowModel","options","paginateExpandedRows","undefined","expanded","rowModel","rows","length","pageSize","pageIndex","flatRows","rowsById","pageStart","pageEnd","slice","paginatedRowModel","expandRows","console","log","handleRow","row","push","subRows","forEach","key","process","env","NODE_ENV","debug","debugAll","debugTable"],"mappings":";;;;;;;;;;;;;;;;;AAIO,SAASA,qBAAT,CAAsDC,IAAtD,EAE4C;AACjD,EAAA,OAAOC,KAAK,IACVC,UAAI,CACF,MAAM,CACJD,KAAK,CAACE,QAAN,EAAA,CAAiBC,UADb,EAEJH,KAAK,CAACI,wBAAN,EAFI,EAGJJ,KAAK,CAACK,OAAN,CAAcC,oBAAd,GACIC,SADJ,GAEIP,KAAK,CAACE,QAAN,EAAiBM,CAAAA,QALjB,CADJ,EAQF,CAACL,UAAD,EAAaM,QAAb,KAA0B;AACxB,IAAA,IAAI,CAACA,QAAQ,CAACC,IAAT,CAAcC,MAAnB,EAA2B;AACzB,MAAA,OAAOF,QAAP,CAAA;AACD,KAAA;;IAED,MAAM;MAAEG,QAAF;AAAYC,MAAAA,SAAAA;AAAZ,KAAA,GAA0BV,UAAhC,CAAA;IACA,IAAI;MAAEO,IAAF;MAAQI,QAAR;AAAkBC,MAAAA,QAAAA;AAAlB,KAAA,GAA+BN,QAAnC,CAAA;AACA,IAAA,MAAMO,SAAS,GAAGJ,QAAQ,GAAGC,SAA7B,CAAA;AACA,IAAA,MAAMI,OAAO,GAAGD,SAAS,GAAGJ,QAA5B,CAAA;IAEAF,IAAI,GAAGA,IAAI,CAACQ,KAAL,CAAWF,SAAX,EAAsBC,OAAtB,CAAP,CAAA;AAEA,IAAA,IAAIE,iBAAJ,CAAA;;AAEA,IAAA,IAAI,CAACnB,KAAK,CAACK,OAAN,CAAcC,oBAAnB,EAAyC;MACvCa,iBAAiB,GAAGC,8BAAU,CAAC;QAC7BV,IAD6B;QAE7BI,QAF6B;AAG7BC,QAAAA,QAAAA;AAH6B,OAAD,CAA9B,CAAA;AAKD,KAND,MAMO;AACLI,MAAAA,iBAAiB,GAAG;QAClBT,IADkB;QAElBI,QAFkB;AAGlBC,QAAAA,QAAAA;OAHF,CAAA;AAKD,KAAA;;AAEDM,IAAAA,OAAO,CAACC,GAAR,CAAYH,iBAAiB,CAACT,IAA9B,CAAA,CAAA;IAEAS,iBAAiB,CAACL,QAAlB,GAA6B,EAA7B,CAAA;;IAEA,MAAMS,SAAS,GAAIC,GAAD,IAAqB;AACrCL,MAAAA,iBAAiB,CAACL,QAAlB,CAA2BW,IAA3B,CAAgCD,GAAhC,CAAA,CAAA;;AACA,MAAA,IAAIA,GAAG,CAACE,OAAJ,CAAYf,MAAhB,EAAwB;AACtBa,QAAAA,GAAG,CAACE,OAAJ,CAAYC,OAAZ,CAAoBJ,SAApB,CAAA,CAAA;AACD,OAAA;KAJH,CAAA;;AAOAJ,IAAAA,iBAAiB,CAACT,IAAlB,CAAuBiB,OAAvB,CAA+BJ,SAA/B,CAAA,CAAA;AAEA,IAAA,OAAOJ,iBAAP,CAAA;AACD,GAlDC,EAmDF;IACES,GAAG,EAAEC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,aAAzB,IAA0C,uBADjD;AAEEC,IAAAA,KAAK,EAAE,MAAA;AAAA,MAAA,IAAA,qBAAA,CAAA;;MAAA,OAAMhC,CAAAA,qBAAAA,GAAAA,KAAK,CAACK,OAAN,CAAc4B,QAApB,oCAAgCjC,KAAK,CAACK,OAAN,CAAc6B,UAA9C,CAAA;AAAA,KAAA;AAFT,GAnDE,CADN,CAAA;AAyDD;;;;"}
@@ -3783,8 +3783,13 @@ function groupBy(rows, columnId) {
3783
3783
 
3784
3784
  function getExpandedRowModel() {
3785
3785
  return table => memo(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {
3786
- if (!rowModel.rows.length || // Do not expand if rows are not included in pagination
3787
- !paginateExpandedRows || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
3786
+ if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
3787
+ return rowModel;
3788
+ }
3789
+
3790
+ if (!paginateExpandedRows) {
3791
+ // Only expand rows at this point if they are being paginated
3792
+ console.log(rowModel.rows);
3788
3793
  return rowModel;
3789
3794
  }
3790
3795
 
@@ -3798,7 +3803,7 @@ function getExpandedRowModel() {
3798
3803
  }
3799
3804
  });
3800
3805
  }
3801
- function expandRows(rowModel, table) {
3806
+ function expandRows(rowModel) {
3802
3807
  const expandedRows = [];
3803
3808
 
3804
3809
  const handleRow = row => {
@@ -3820,7 +3825,7 @@ function expandRows(rowModel, table) {
3820
3825
  }
3821
3826
 
3822
3827
  function getPaginationRowModel(opts) {
3823
- return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel()], (pagination, rowModel) => {
3828
+ return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {
3824
3829
  if (!rowModel.rows.length) {
3825
3830
  return rowModel;
3826
3831
  }
@@ -3853,6 +3858,7 @@ function getPaginationRowModel(opts) {
3853
3858
  };
3854
3859
  }
3855
3860
 
3861
+ console.log(paginatedRowModel.rows);
3856
3862
  paginatedRowModel.flatRows = [];
3857
3863
 
3858
3864
  const handleRow = row => {