Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resize Month Events and Resize Week/Day Events on Both Ends (#578)
* Fix incorrect destructuring of eventComponent in DayColumn#renderEvents * Pass through an event component with a resize anchor * Make resize anchor draggable * Make resize anchor droppable * Use isOver prop to resize * Rename and refactor * Correct alignment of entire anchor and not just icon * Differentiate between drag and drop callback fires * Add example code for using the resizable event feature * Rename ResizableEventComponent -> ResizableEvent * Pass Down Resizable Prop to Event Cell Summary: For <EventCell /> to know that it can be resized I am passing down the resize prop to that component. This is because, unlike in the previous implementation, I am not passing down what would be the eventWrapper from the dragAndDrop addon. I didn't know how to pass down multiple components based on whether the calendar was resizable. So I went this route. Sorry, not sorry. * Update Resize Function and Rename Component Summary: Updated the resize function to be aware of the end as well as the start time. This is when there are two dnd handlers on an event at once. I renamed the component to be more semantic with its usage. Styles were correspondingly updated. * Add Top Drag and Refactor Component Summary: Refactored <ResizableEvent /> and added the ability to resize the top component. * Refactor If/Else Statement Summary: Refactored the if/else statement into a switch statement. * feat: pass down event components from top-level summary: remove resizable prop from lower-level components so that resizable logic is encapsulated in the dnd addon. * Pass 'isAllDay' prop to header event components * docs: update docs with resizable prop
- Loading branch information