premieroctet/next-admin

[BUG] - Form does not update JSON input value after react-hydration-error

DriveSoft opened this issue · 1 comments

Description

In my options.tsx file I'm showing user name and user email in method toString

   model: {
      User: {
         title: "Users",
         toString: (user) => `${user.name} (${user.email})`,

But it causes error when I'm opening a form with existed record:
image
image

On the form I have JSON input component which does not return updated value anymore after those errors, so basically I'm not be able to update json data for the opened record.

If I just remove user.email from toString methods, everything works fine:

   model: {
      User: {
         title: "Users",
         toString: (user) => user.name ?? "",

Reproduction URL

none

Reproduction steps

none

Next router

App router

Next Admin version

4.4.4

Screenshots

![DESCRIPTION](LINK.png)

Next Admin options

No response

Logs

No response

Browsers

No response

Hello @DriveSoft , could you please update to v5 and check if the issue still persists ? Thank you !