11import { Column , Header , HeaderGroup , RowData , Table } from '../../types'
22
3- export const debugHeaders = 'debugHeaders'
3+ export interface TableOptions_Headers {
4+ /**
5+ * Set this option to `true` to output header debugging information to the console.
6+ * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/table#debugheaders)
7+ * @link [Guide](https://tanstack.com/table/v8/docs/guide/tables)
8+ */
9+ debugHeaders ?: boolean
10+ }
411
5- export interface HeaderGroup_Core < TData extends RowData > {
6- depth : number
7- headers : Header < TData , unknown > [ ]
8- id : string
12+ export interface Table_Headers < TData extends RowData > {
13+ /**
14+ * Returns all header groups for the table.
15+ * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getheadergroups)
16+ * @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
17+ */
18+ getHeaderGroups : ( ) => HeaderGroup < TData > [ ]
19+ /**
20+ * Returns the footer groups for the table.
21+ * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getfootergroups)
22+ * @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
23+ */
24+ getFooterGroups : ( ) => HeaderGroup < TData > [ ]
25+ /**
26+ * Returns headers for all columns in the table, including parent headers.
27+ * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getflatheaders)
28+ * @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
29+ */
30+ getFlatHeaders : ( ) => Header < TData , unknown > [ ]
31+ /**
32+ * Returns headers for all leaf columns in the table, (not including parent headers).
33+ * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getleafheaders)
34+ * @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
35+ */
36+ getLeafHeaders : ( ) => Header < TData , unknown > [ ]
937}
1038
1139export interface HeaderContext < TData , TValue > {
@@ -23,7 +51,7 @@ export interface HeaderContext<TData, TValue> {
2351 table : Table < TData >
2452}
2553
26- export interface Header_Core < TData extends RowData , TValue > {
54+ export interface Header_CoreProperties < TData extends RowData , TValue > {
2755 /**
2856 * The col-span for the header.
2957 * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#colspan)
@@ -42,18 +70,6 @@ export interface Header_Core<TData extends RowData, TValue> {
4270 * @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
4371 */
4472 depth : number
45- /**
46- * Returns the rendering context (or props) for column-based components like headers, footers and filters.
47- * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#getcontext)
48- * @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
49- */
50- getContext : ( ) => HeaderContext < TData , TValue >
51- /**
52- * Returns the leaf headers hierarchically nested under this header.
53- * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#getleafheaders)
54- * @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
55- */
56- getLeafHeaders : ( ) => Header < TData , unknown > [ ]
5773 /**
5874 * The header's associated header group object.
5975 * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#headergroup)
@@ -98,29 +114,24 @@ export interface Header_Core<TData extends RowData, TValue> {
98114 subHeaders : Header < TData , TValue > [ ]
99115}
100116
101- export interface Table_Headers < TData extends RowData > {
102- /**
103- * Returns all header groups for the table.
104- * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getheadergroups)
105- * @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
106- */
107- getHeaderGroups : ( ) => HeaderGroup < TData > [ ]
108- /**
109- * Returns the footer groups for the table.
110- * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getfootergroups)
111- * @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
112- */
113- getFooterGroups : ( ) => HeaderGroup < TData > [ ]
117+ export interface Header_Core < TData extends RowData , TValue >
118+ extends Header_CoreProperties < TData , TValue > {
114119 /**
115- * Returns headers for all columns in the table, including parent headers.
116- * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers#getflatheaders )
120+ * Returns the rendering context (or props) for column-based components like headers, footers and filters .
121+ * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header#getcontext )
117122 * @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
118123 */
119- getFlatHeaders : ( ) => Header < TData , unknown > [ ]
124+ getContext : ( ) => HeaderContext < TData , TValue >
120125 /**
121- * Returns headers for all leaf columns in the table, (not including parent headers) .
122- * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/headers #getleafheaders)
126+ * Returns the leaf headers hierarchically nested under this header .
127+ * @link [API Docs](https://tanstack.com/table/v8/docs/api/core/header #getleafheaders)
123128 * @link [Guide](https://tanstack.com/table/v8/docs/guide/headers)
124129 */
125130 getLeafHeaders : ( ) => Header < TData , unknown > [ ]
126131}
132+
133+ export interface HeaderGroup_Core < TData extends RowData > {
134+ depth : number
135+ headers : Header < TData , unknown > [ ]
136+ id : string
137+ }
0 commit comments