Skip to content

feat: add type declarations #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- feat: add `ignoreFunctionInColumnCompare` to solve closure problem in renderers
- chore: skip unnecessary cloneElement in `renderElement`
- feat: add type declarations

## v1.10.9 (2020-08-13)

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "a react table component to display large data set with high performance and flexibility",
"main": "lib/index.js",
"module": "es/index.js",
"types": "types/index.d.ts",
"files": [
"lib/",
"es/",
Expand Down Expand Up @@ -62,6 +63,7 @@
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@types/react": "^16.9.46",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lib uses react 16.4. Are the typings for 16.9 consistent w/ 16.4?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that should be OK as it's dev only to suppress the warning about the types from React

"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^9.0.0",
"babel-jest": "^23.4.2",
Expand Down
5 changes: 4 additions & 1 deletion src/BaseTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ class BaseTable extends React.PureComponent {

/**
* Reset cached offsets for positioning after a specific rowIndex, should be used only in dynamic mode(estimatedRowHeight is provided)
*
* @param {number} rowIndex
* @param {boolean} shouldForceUpdate
*/
resetAfterRowIndex(rowIndex = 0, shouldForceUpdate = true) {
if (!this.props.estimatedRowHeight) return;
Expand Down Expand Up @@ -283,7 +286,7 @@ class BaseTable extends React.PureComponent {
* - `center` - Center align the row within the table.
* - `end` - Align the row to the bottom side of the table.
* - `start` - Align the row to the top side of the table.

*
* @param {number} rowIndex
* @param {string} align
*/
Expand Down
Loading