Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Typescript + API Cleanup + Simple Components #30

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

Open
marchaos wants to merge 26 commits into master
base: master
Choose a base branch
Loading
from typescript
Open

Conversation

Copy link
Owner

@marchaos marchaos commented Nov 30, 2020
edited
Loading

Converted all files to TS + Small cleanup to API + new simpler components

Changes

  • Added Types for StickyTree, AutoSizedStickyTree
  • Added a new component StickyList and AutoSizedStickyList which simplifies the API for those that just want to render a list. See CitiesList.tsx in examples.
  • Added examples and Cypress tests - you can run these locally with npm start

Breaking Changes

  • defaultRowHeight prop is now just rowHeight
  • getChildren receives to node object for the parent, and should now return a node as a prop on the info return, e.g
 const getChildren = (node: MyNodeType, nodeInfo: EnhancedStickyTreeNode<MyNodeType>) => {
 return [
 { 
 isSticky: true,
 node: { id: 'child1', name: 'Child 1' }
 }
 ]
 }
  • onRowsRendered props for startNode and endNode are now of type EnhancedStickyTreeNode<TNodeType>
  • rowRenderer now receives the node to render that was returned by getChildren, e.g.
 const rowRenderer = ({ node, style }) => {
 return (
 <div className="node-row" style={style} key={node.id}>
 {node.name}
 </div>
 );
 }

yfrommelt reacted with heart emoji
Marc McIntyre added 7 commits November 25, 2020 11:00
* Added example and simple Cypress test
* Added prettier config
* Cleanup
* Fixed TS types for AutoSizedStickyTree
* Fixed build so we include ts definitions.
* Fixed build and tests
* Added basic test for StickyList
* Fixed some prop types for StickyTree
* Added example for List
...u supplied, rather than just the id to avoid having to look up the node again.
@marchaos marchaos changed the title (削除) Typescript + Cleanup (削除ここまで) (追記) Typescript + API Cleanup + Simple Components (追記ここまで) Dec 1, 2020
Marc McIntyre and others added 14 commits December 1, 2020 10:45
...ky tree element (so that you can override it with CSS)
...h_height
Prop for not setting inline width height
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /