Bug in Rich Text Editor component?

Hi,

I'm using a rich text editor component inside a form. I set the value in the success event of a query api resource. When I want to submit the form I get a different value in the submit event for the rich text editor value then the state value of the component? The returned value is some kind of default value.

Is this a bug?

Hey @Robby_Ceyssens!

This actually looks very similar to the bug mentioned in this thread which we've had some trouble reproducing :pensive: Do you notice the same issue if you reference the rich text editor's value before submitting the form?

Also, are you seeing this behavior consistently? If we could step into your app and take similar steps to reproduce the behavior that would be great!

Hi,

In my app it happens almost every time. I added an onfocus event with a simple console.log of the value on the rich editor component and the value is still wrong.
In the state view the value is correct. In my opinion there is something wrong with getting the value of the rich editor component.

I'm also setting the value of the rich editor component depending on the selected row in the overview table similar to the users in the other topic.

You can look into our app "Tuinklussen" to reproduce the issue.

Thanks for that @Robby_Ceyssens! That helps a lot for recreating the issue. We can let you know here when it's fixed - in the meantime can you try using setValue on a temporary state instead of the Rich Text Editor itself and then pass {{ yourTempState.value }} as the "Default value" for the component:

Let me know if that works!

Thanks for the workaround. Using the temp state seems to work.

I also noticed now I used the value currentRow.text to get the selected value in my table. For the temp state workaround I needed to use selectedRow.text because currentRow.text didn't have the correct value. Maybe this is related to the bug?

Ah, that is also something on the dev team's radar. It may be related but some of the other reports for the bug you originally reported weren't referencing currentRow so it seems as though the scope is a bit broader as well.

Thanks for surfacing it either way! I'll report back on both bugs here :slightly_smiling_face:

Hi, any update on these bugs?

Hi @Robby_Ceyssens, no updates just yet, sorry :pensive:

Hi,

We just started to use a few more apps with the rich text editor but the workaround using the temp state value is still causing very regular errors. A lot of times no content at all is showing in the rich text editor so this is not usable at this time for us.

You can reproduce the error in this app: Partnerberichten - copy
When you search for the id "18768" and select the row, the value of the field "NewsitemDescription" (Beschrijving) is not displayed although it based on a temp state value.

This problem is very urgent for us as the rich text editor is not usable at the moment and is causing unpredictable results and data errors.

Hey @Robby_Ceyssens,

The Rich Text Editor bug still needs further investigation but a fix for currentRow was recently pushed. Are you seeing better behavior on that end?

Hi,

Which fix did you release exactly because I don't see a currentRow in the state of my table anymore? See screenshot.

It's a fix for currentRow and currentSourceRow as they exist in the context of "Click row" and "Click cell" event handlers. Since both are dependent on which row is clicked they don't exist more generically in the state of the table, but should work properly in the event handlers.

Is there an ETA on when this investigation is going to happen? We're facing similar issues with the Rich Text Editor which is blocking us from looking at Retool for more use cases.

I already reported these problems with the rich text editor months ago and I have been in contact with support a few times. This problem is reproducable and is related to timing issues I think because it doesn't happen every time.
I'm also still waiting for a solution for this.

Hi @Kabirdas ,

I created an app Robby which you can use to reproduce the problem if you open the app on our staging environment and select the row with grantId 951.
The detail tab is selected when selecting a row. In the detail tab you can see 2 fields 'introduction' and 'description'. The wysiwyg field should contain the same value as the text field above it since it uses the same form key.

When you switch rows in the 'list' tab you can see most of the time the introduction field doesn't match.

This is a very easy example to reproduce the problem so you should be able to provide a bugfix for this asap since there are several other threads about this problem.

The problem is also related to the use of a tabbed container because this problem doesn't occur when all components are placed in the same container.

Can somebody from Retool please respond when this will be looked at? This problem is causing a lot of user frustration and sometimes even data loss for us for several months now.

Hi @Robby_Ceyssens thanks for checking in and providing this update. Unfortunately, we're no longer able to log into customer accounts, but I'd love to see an export if you can share:

Either way, I'll check in on this bug internally, as I see it's still in our queue

1 Like

Hi, you can find the export in the attachment.

Robby.json (76.9 KB)

Hi @Tess , any updates on this since this shouldn't be hard to reproduce and fix in my opinion?

Hi @Robby_Ceyssens, the fact that this problem doesn't occur when all components are placed in the same container, as well as the issue not happening every time, makes me think that what we're experiencing is related to the following:

If a component is hidden, which is the case if it's on a non-visible tab, any APIs to update its model will not work. I believe this is the reason why the workaround is not working for you, it may be related to timing issues as you suspect.

Here is an example of how to successfully update data on a non-visible tab using event handlers and temp state:

However, your use case is very different than the example above, so please join us during Office Hours so we can take a closer look at this issue and provide you with live support to get your app working as expected.