tabulify 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- export interface Column<T> {
2
+ export interface Column<T, K extends keyof T = keyof T> {
3
3
  title: string;
4
- dataIndex: keyof T;
5
- key: keyof T;
4
+ dataIndex: K;
5
+ key: K;
6
6
  sorter?: (a: T, b: T) => number;
7
- render?: (value: T[keyof T], record: T, index: number) => React.ReactNode;
7
+ render?: (value: T[K], record: T, index: number) => React.ReactNode;
8
8
  }
9
9
  export interface RowSelection<T> {
10
10
  type: 'checkbox' | 'radio';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabulify",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "type": "module",
5
5
  "description": "A lightweight and customizable React table component.",
6
6
  "main": "dist/index.js",