DialogComponent's content with state change

Hi

When a dialog has content and inside the content, I change the state, it is causing the dialog to re-render and the focus is lost from the field in each key press.

Following is a sample code

const [groupName, setGroupName] = useState("");

<DialogComponent ... content={content} />

const content = () => {
        return (
            <input value={groupName} onChange={(e) => setGroupName(e.target.value)} placeholder="Group name"/>
        )
}

Another field which is updating redux and not the state, seems to work ok, maybe because the state is not updated.
Please advice

14 Replies

AM Amos May 16, 2021 03:27 PM UTC

Also, not sure if and how it's related but when the header is based on a state value, changing the state does not change the header

<DialogComponent width={400} isModal={true} header={questionTitle} position={{x: 'center', y: 'center'}} buttons={questionButtons}
                             ref={questionRef} showCloseIcon={true} visible={false} content={questionContent}/>

    const changeName = () => {
        setQuestionTitle("Enter new name");
        setTimeout(questionRef.current.show(),500);
    }

I tried with setTimeout but it didn't change anything
notice that it's a dialog on top of a dialog but it resides in the same page as the first dialog (2 DialogComponent)


AM Amos May 17, 2021 08:00 AM UTC

Regarding point 1 above, I changed the dialog to be a "page", meaning not as part of a DialogComponent and the state change does not lose the focus from the field
Regarding point 2: still checking if it's related to if it's something else.


RK Revanth Krishnan Syncfusion Team May 17, 2021 12:39 PM UTC

Hi Amos,  
  
We are currently validating your query, we will update you with further details on or before 20th May 2021. 
  
We appreciate your patience until then,  
   
Regards,  
Revanth 



AM Amos May 21, 2021 07:33 AM UTC

A kindly reminder :)


RK Revanth Krishnan Syncfusion Team May 24, 2021 11:34 AM UTC

Hi Amos, 
 
 
Sorry for the delay in the update. 
 
 
We have further validated your query and we are able to reproduce the issue from our end and we have considered “Input element focus lost on statechange while used as template” as a bug from our end and logged the report for the same and due to its complexity in fixing the issue it will be included in the 2021 Volume 2 release.  
      
You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link: https://www.syncfusion.com/feedback/22918 
 
Regards, 
Revanth 



AM Amos May 24, 2021 11:39 AM UTC

Thanks, when is 2021 Volume 2 release is estimated to be released?


RK Revanth Krishnan Syncfusion Team May 24, 2021 01:09 PM UTC

Hi Amos, 
 
The 2021 Volume 2 is scheduled to be released by the end of June 2021. 
 
Regards, 
Revanth 



RK Revanth Krishnan Syncfusion Team July 1, 2021 03:51 PM UTC

Hi Amos, 
 
Sorry for the inconvenience.   
   
Still, we have not fixed the issue as we are facing complexity, we will include the fix in the coming 2021 Volume 2 SP release. 
We appreciate your patience till then.   
   
Regards,   
Revanth 



VJ Vinitha Jeyakumar Syncfusion Team August 13, 2021 11:36 AM UTC

Hi Amos,  
  
 
Sorry for the inconvenience.    
 
    
We couldn’t include the fix as planned because of the complexity. We will include the fix with our 2021 Vol 3 release. 
 
We appreciate your patience till then.    
    
Regards, 
Vinitha 



VJ Vinitha Jeyakumar Syncfusion Team October 4, 2021 12:54 PM UTC

Hi Amos, 
 
 
Sorry for the inconvenience caused. 
 
 
We couldn’t include the fix for the issue, since we are facing complexity in fixing the bug. We will include the fix for the issue with our upcoming service pack release at the end of October 2021. 
 
We appreciate your patience until then. 
 
Regards, 
Vinitha 



VJ Vinitha Jeyakumar Syncfusion Team November 1, 2021 12:02 PM UTC

Hi Amos,  
  
  
As we promised earlier, the fix for the issue will be included with our Vol 3 SP1 release. 
  
We appreciate your patience until then. 
 
Regards, 
Vinitha 



GV Gokulraj Varatharajan Syncfusion Team November 29, 2021 07:13 AM UTC

Hi Amos,  
   
Sorry for the inconvenience caused.  
   
We would like to let you know that we are unable to complete it as planned due to complexity and we will include the fix with our Volume 4 release. 
 
We appreciate your patience until then.  
  
Regards,  
Gokul


GV Gokulraj Varatharajan Syncfusion Team December 22, 2021 11:29 AM UTC

Hi Amos,  
  
We are sorry for the inconvenience caused.   
  
We are unable to complete this as planned due to the complexity and other external factors but we assure you that we expect the fix for this issue will be included with our Volume 4, SP1 release. We kindly request your support until then. 
  
Please get back to us if you have any queries.  
  
Regards,  
V Gokul


GV Gokulraj Varatharajan Syncfusion Team February 8, 2022 05:24 AM UTC

Hi Amos, 
 
Thank you for your patience. 
 
We are glad to announce that our Essential Studio 2021 Volume 4 SP release v19.4.0.48 is rolled out and is available for download under the following link. 
 
 
The reported issue “Input element focus lost on state change while used as template” has been fixed in version v19.4.42. Please upgrade your packages to this version to avoid the issue. 

 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards,            
Gokul 


Loader.
Up arrow icon