- Home
- Forum
- React - EJ 2
- Grid column template renders on dev server but not in production build
Grid column template renders on dev server but not in production build
I have a grid where, due to our data model, almost every column is templated. This grid renders perfectly on a dev server (`react-scripts start` with environment variables) but when built, the same grid has no contents in all templated columns.
Here's a column definition:
This template function returns a plain string. It renders fine on a dev server but does not in a production build. The function does still run; I've verified this with the browser debugger.
Hi Duncan Gibson,
Greetings from Syncfusion support.
After reviewing your query, we could see that you are facing an issue with rendering the templates in the production build. You have mentioned that "almost every column is templated," but in the given code example, only one column is shared. Please confirm whether you are facing an issue only with the shared column.
If so, please ensure that all environment variables affecting the build process, especially those related to locale or date formatting, are consistent in both your development and production environments. Additionally, use console.log statements within the template function to check if the `createdAt` value is being parsed correctly.
If the issue pertains to all template columns, please provide the following details to help us further investigate the problem:
- Please share the column definitions of other template columns along with the template definition.
- Provide the complete Grid rendering code and specify the type of data binding used in the Grid.
- Indicate whether remote or local data is being used. If remote data is utilized, please specify the adaptor type and include the code lines defining the data manager.
- Please share the Syncfusion package version and provide a video demonstration showing the issue replication.
The above requested details will be helpful to validate further at our end and provide solution as earlier as possible.
Regards
Aishwarya R
- This applies to all columns with a template function.
- The data binding is through a custom DataManager built to provide interoperability with React state, including CRUD features.
- The Syncfusion package versions are:
Hi Duncan Gibson,
We have created a ticket under your Syncfusion account. Kindly provide the requested code details of complete Grid rendering, including template definitions for other columns. Additionally, please share the code lines defining the DataManager.
Thank you for your cooperation. We look forward to assisting you further.
Regards
Aishwarya R
- 3 Replies
- 2 Participants
-
DG Duncan Gibson
- Apr 4, 2024 03:30 PM UTC
- Apr 12, 2024 01:35 PM UTC