Skip to content

Commit

Permalink
Merge pull request #4 from routific/beta-rowRenderer
Browse files Browse the repository at this point in the history
Beta Release - Row renderer, performance improvements
  • Loading branch information
sjustason authored May 5, 2022
2 parents 901333b + bc43510 commit d29b633
Show file tree
Hide file tree
Showing 87 changed files with 6,009 additions and 2,235 deletions.
41 changes: 40 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,46 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres (more or less) to [Semantic Versioning](http://semver.org/).

## Unreleased
## 0.30.0 (Unreleased)

### Fixes and Improvements

- create local stack context for z-index @ilaiwi
- huge performance improvements @ilaiwi
- [new examples](https://github.com/namespace-ee/react-calendar-timeline/tree/rowRenderer/examples)
- `z-index`: removed for vertical lines, cursor line, horizontal lines

### New features

#### [rowRenderer](https://github.com/namespace-ee/react-calendar-timeline/tree/rowRenderer#row-renderer)

This API would give you control to add custom UI on calendar rows using a render prop. You can control what is rendered by default with the library like Items and Vertical/Horizontal lines, and the renderer will provide you the ability to render custom backgrounds and droppable layers for custom dnd.

#### [`hideHorizontalLines` prop](https://github.com/namespace-ee/react-calendar-timeline/tree/rowRenderer#hidehorizontallines)

Boolean to hide or show HorizontalLines. `true` by default. Hiding the horizontalLines will have a good impact on performance.

#### [helpers](https://github.com/namespace-ee/react-calendar-timeline/tree/rowRenderer#helpers)

Helpers are methods provided by `HelperContext`. These helpers power most of the rendered UI in the timeline like: Headers, Markers, Items and row renderers.

### breaking changes

- `onItemMove`

changed from `onItemMove(itemId, dragTime, newGroupOrder)` to `onItemMove(itemId, dragTime, newGroupId)`. Now you will be provided with a new group id instead of new group order

- `onItemDrag`

changed from providing `newGroupOrder` to `newGroupId`. Now you will be provided with a new group id instead of new group order

- saving state in `Item` using `itemRenderer`

if you render a stateful component via `itemRenderer` then the state will be lost because item will unmount in some cases

- You need to do `e.stopPropagation()` for all callbacks passed to `itemRenderer`

## 0.27.0

* Add unit argument to onZoom and onTimeChange callbacks
* Add `className` prop to Timeline component to override `react-calendar-timeline` class #682
Expand Down
Loading

0 comments on commit d29b633

Please sign in to comment.