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:
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
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.
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.
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:
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.
Hi @Paulo, I already reported this problem last year in june 23 as you can see. The temp state solution was also suggested but doesn't work. I did some more testing recently and this bug is not related to using (non visible) tabbed containers, it even occurs when using no containers. Using more then 1 rich text editor field does trigger the bug randomly.
Thank you for doing more testing on your end. I can confirm that @Tess and @Kabirdas have been advocating internally for you and others running into this issue since it was first reported over a year ago. Although we still don't have an estimated release date for a fix, I see that there are new eyes on it, which is a great sign of a step in the right direction. We'll continue to advocate for you and extend your feedback internally until it's resolved.
One thing I just noticed is that when the app loads, the Rich Text Editors take a few seconds to become ready to take in data dynamically. In other words, it takes a few seconds for their default value to work with a reference to the output of a query.