Feature request
Add a _loading_ prop that would show a loading indicator on top of the calendar and prevent user interaction.
This sounds more like something you'd build yourself outside of the calendar. Or how/when would the calendar show it?
I did, but it would be nice to just have a boolean to flip
It's not obvious to me that there is a good, general, UI/UX for that. I'm ok adding some defaults but in this case i don't most people would be happy with the default, regardless of what it is, since it'll be so specific to what your app wants.
Agreed -maybe a HoC- but that would derail the lib. closing
I had a similar use-case:
I just wanted to indicate somehow that the Calendar events are filtering or data is loading (waiting for back-end response).
Here's my simple approach:
I'm adding filtering class to the wrapper div of Calendar when I'm waiting for the new events (back-end response). This class manipulates the opacity of Calendar. it works smoothly, looks good and it is a very simple as implementation.
// CSS
.filtering .rbc-time-view, .filtering .rbc-month-view {
opacity: 0.5;
}
// React
<div className={isFiltering ? 'filtering' : null}>
<Calendar {...rest} />
</div>
Most helpful comment
I had a similar use-case:
I just wanted to indicate somehow that the Calendar events are filtering or data is loading (waiting for back-end response).
Here's my simple approach:
I'm adding
filteringclass to the wrapper div of Calendar when I'm waiting for the new events (back-end response). This class manipulates theopacityof Calendar. it works smoothly, looks good and it is a very simple as implementation.