Hi! I tried to use state in dialog's header, content and footer templates. Header and Footer were showing state value but content did not. Is it possible that content template is somehow broken? If not, what am I doing wrong? Here is my code:
As a side note.... if I looked at components in React dev tools there were multiple headers and footers and only one content. Which is kind of weird. Should there be so many header/footer components?
Until then you can use the below workaround to resolve your reported issue in sample level by using the Dialog content directly without using template,
Sample: https://stackblitz.com/edit/react-dmy3ac?file=src%2FApp.js,src%2Fstyle.css
Regards,
Vinitha
Hi Janno,
Sorry for
the delay caused.
We are glad to announce that our Essential Studio 2022 Volume 4 release
v20.4.0.38 is rolled out and is available for download under the following
link.
The issue with “React state change value is not reflected inside the Dialog content template” has been resolved in this release. To access this fix, we suggest you to update the package to the latest version 20.4.38.
We would like to inform you that, by default the Dialog component content will not be updated while state updates. To resolve this, we suggest to use statelessTemplates property value as empty array. This property specifies the array of the template names where the state value updates need to be ignored.
For your reference, we have prepared a sample in the link: https://stackblitz.com/edit/react-ntrkyi-7maupn?file=index.js
Release notes: https://ej2.syncfusion.com/react/documentation/release-notes/20.4.38/?type=all#common
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,
Theveshwar