We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19a6574 commit 7699425Copy full SHA for 7699425
src/agenda/index.tsx
@@ -135,8 +135,9 @@ export default class Agenda extends Component<AgendaProps, State> {
135
}
136
137
componentDidUpdate(prevProps: AgendaProps, prevState: State) {
138
- if (this.props.selected && !sameDate(new XDate(this.props.selected), prevState.selectedDay)) {
139
- this.setState({selectedDay: this.getSelectedDate()});
+ const newSelectedDate = this.getSelectedDate();
+ if (!sameDate(newSelectedDate, prevState.selectedDay)) {
140
+ this.setState({selectedDay: newSelectedDate});
141
} else if (!prevProps.items) {
142
this.loadReservations(this.props);
143
0 commit comments