Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Scheduler] Update resources after first initialization #2693

Closed
2 of 4 tasks
fabdts opened this issue Feb 21, 2020 · 2 comments · Fixed by #2699
Closed
2 of 4 tasks

[Scheduler] Update resources after first initialization #2693

fabdts opened this issue Feb 21, 2020 · 2 comments · Fixed by #2699
Assignees
Labels
bug Scheduler The DevExtreme Reactive Scheduler component

Comments

@fabdts
Copy link

fabdts commented Feb 21, 2020

  • I have searched this repository's issues and believe that this is not a duplicate.

I'm using ...

  • React Grid
  • React Chart
  • React Scheduler

Current Behaviour

Hello,

I am using the Resources plugin and the AppointmentTooltip. Resources are found when I fetch my appointments. This means that resource's possible values are updated in time and my appointments are using the exact resource's possible values.

planning_error

So at initialization I get like 20 possible values for the resource, when I click to the next week or next month I can get only 10 possible values (the 20 and the 10 possible values are used). It seems that appointments are rendered before resource is updated and sometimes I get this error :

Capture d’écran 2020-02-21 à 14 16 48

Expected Behaviour

Update resource before render new fetched appointments?

Steps to Reproduce

In this example users are generated from the appointments in the action.

Reducer:

 case SET_APPOINTMENTS:
  draft.appointments = action.appointments;
  draft.users = action.users;
  draft.loading = false;
  break;

Component:

const { appointments, users } = store;
<Scheduler data={appointments}>
  ...
  <ViewState
    currentViewName={currentView}
    onCurrentDateChange={date => setCurrentDate(date)} // API fetch
    onCurrentViewNameChange={view => setCurrentView(view)} // API fetch
   />
  ...
  <Resources
    data={[
      {
        fieldName: 'userId',
        title: 'User',
        instances: users, // From the store updated when appointments are updated
        },
    ]}
  />
</Scheduler>

Screenshots

Environment

  • devextreme-reactive: 2.4.0
  • react: 16.12.0
  • browser: Opera GX 66
  • material-ui: 4.9.3
@AryamnovEugeniy AryamnovEugeniy self-assigned this Feb 21, 2020
@AryamnovEugeniy AryamnovEugeniy added bug Scheduler The DevExtreme Reactive Scheduler component labels Feb 21, 2020
@AryamnovEugeniy
Copy link
Contributor

Hello @ARL64!

Thank you for reporting the issue. We will fix this as soon as possible.

@lock
Copy link

lock bot commented Mar 10, 2020

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Scheduler The DevExtreme Reactive Scheduler component
Projects
None yet
2 participants