Skip to content

Commit

Permalink
pass dates to slotGroupPropGetter
Browse files Browse the repository at this point in the history
so you can make styling decisions based on date
  • Loading branch information
skv-headless committed Nov 29, 2021
1 parent 76e6254 commit 0c2c295
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 @@ -569,7 +569,7 @@ class Calendar extends React.Component {
* Optionally provide a function that returns an object of props to be applied
* to the time-slot group node. Useful to dynamically change the sizing of time nodes.
* ```js
* () => { style?: Object }
* (group: Date[]) => { style?: Object }
* ```
*/
slotGroupPropGetter: 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 @@ -14,7 +14,7 @@ export default class TimeSlotGroup extends Component {
components: { timeSlotWrapper: Wrapper = BackgroundWrapper } = {},
} = this.props

const groupProps = getters ? getters.slotGroupProp() : {}
const groupProps = getters ? getters.slotGroupProp(group) : {}
return (
<div className="rbc-timeslot-group" {...groupProps}>
{group.map((value, idx) => {
Expand Down

0 comments on commit 0c2c295

Please sign in to comment.