Editor Template failing after state change

Hi, I have an issue where the editor template no longer renders after a change of state in the component. I have created a repro made as a cut down version of the code found here https://ej2.syncfusion.com/react/demos/#/material/schedule/editor-template 

The repro code runs in Stackbitz, produces the screen shots below and is attached.

When executed the scheduler component appears as expected on the page and double clicking in a cell opens the editor which can be seen to be using the template



Clicking the "Change State" button causes react to re-render owing to the sate change after which double clicking a cell results in this.



The template is no longer honored.

Can someone please tell me what I'm missing.

Thanks

Chris.

Attachment: 35mvuz.run_8f5cf381.zip

3 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team October 24, 2018 11:39 AM UTC

 
Thank you for contacting Syncfusion support. 
 
We could reproduce the reported issue with the provided sample. While investigating, we found that editorTemplate value is not assigned properly which is the cause for the issue. Kindly use the below code example in your sample to overcome it and for the same we had modified your sample which can be download from the below location. 
 
constructor() { 
        super(...arguments); 
        this.state = { stateValue: 'StartValue' } 
        this.changeState = this.changeState.bind(this); 
        this.editorTemplate = this.editorTemplate.bind(this) 
    } 
 
<ScheduleComponent  
              editorTemplate={this.editorTemplate} 
              showQuickInfo={false} > 
              <ViewsDirective> 
                <ViewDirective option='Week' /> 
              </ViewsDirective> 
              <Inject services={[Week]} /> 
            </ScheduleComponent> 
 
Regards, 
Karthigeyan 



CH Christopher October 24, 2018 03:30 PM UTC

Thanks, that's got me moving again.


KK Karthigeyan Krishnamurthi Syncfusion Team October 25, 2018 03:47 AM UTC

 
We are happy to hear that our solution has resolved your issue. 
 
Regards, 
Karthigeyan 


Loader.
Up arrow icon