Skip to content

Commit

Permalink
feat: pass resourceId to slotPropGetter (jquense#1101)
Browse files Browse the repository at this point in the history
* add resourceId param to slotPropGetter hook

* pass resourceId param to slotPropGetter hook
  • Loading branch information
WebspressoCo authored and jquense committed Nov 13, 2018
1 parent bcc4d93 commit 0e1e1a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ class Calendar extends React.Component {
* position may break the calendar in unexpected ways.
*
* ```js
* (date: Date) => { className?: string, style?: Object }
* (date: Date, resourceId: (number|string)) => { className?: string, style?: Object }
* ```
*/
slotPropGetter: PropTypes.func,
Expand Down
2 changes: 1 addition & 1 deletion src/TimeSlotGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class TimeSlotGroup extends Component {
return (
<div className="rbc-timeslot-group">
{group.map((value, idx) => {
const slotProps = getters ? getters.slotProp(value) : {}
const slotProps = getters ? getters.slotProp(value, resource) : {}
return (
<Wrapper key={idx} value={value} resource={resource}>
<div
Expand Down

0 comments on commit 0e1e1a0

Please sign in to comment.