You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a block with a field with async afterRead will not update output when used inside a lexical richtext.
When the same block is used inside a block field it works as expected.
My reproduction contains two fields inside a block: test1 and test2. They both have an afterRead which puts the value to upper case, test1 is a normal function and test2 runs an async function.
Testing with block
When used as in a block field I do this input:
And then after saving and it's read back I get this output (which is correct):
Testing with lexical
Using the same block inside lexical field I get a difference.
This is my input:
But after saving and reading back I get this output (where I expected both fields to be uppercase):
Describe the Bug
Creating a block with a field with async afterRead will not update output when used inside a lexical richtext.
When the same block is used inside a block field it works as expected.
My reproduction contains two fields inside a block: test1 and test2. They both have an afterRead which puts the value to upper case, test1 is a normal function and test2 runs an async function.
Testing with block
When used as in a block field I do this input:
And then after saving and it's read back I get this output (which is correct):
Testing with lexical
Using the same block inside lexical field I get a difference.
This is my input:
But after saving and reading back I get this output (where I expected both fields to be uppercase):
Link to the code that reproduces this issue
https://github.com/andershermansen/payload-afterread-reproduction
Reproduction Steps
Actual:
First text field is upper case, second text field is lower case
Expected:
Both text fields to be upper case
Which area(s) are affected? (Select all that apply)
area: core, plugin: richtext-lexical
Environment Info
The text was updated successfully, but these errors were encountered: