React-big-calendar: Add loading state

Created on 22 Mar 2018  路  5Comments  路  Source: jquense/react-big-calendar

Do you want to request a _feature_ or report a _bug_?

Feature request

What's the expected behavior?

Add a _loading_ prop that would show a loading indicator on top of the calendar and prevent user interaction.

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 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>

All 5 comments

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>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

crashspringfield picture crashspringfield  路  4Comments

kromit picture kromit  路  4Comments

martinnov92 picture martinnov92  路  3Comments

nicolasriccardi picture nicolasriccardi  路  3Comments

connercms picture connercms  路  3Comments