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
When a RichTextEditor used in details of a row, the value set via rte.asDelta().setValue('XY') is ignored and null displayed instead Note: this seems similar to this task #4551
Expected outcome
RTE has correct value displayed, not null
Minimal reproducible example
@Route(value = "test-view", layout = MainLayout.class)
publicclassTestViewextendsFlexBoxLayout {
record User(StringfirstName, StringlastName) {
}
List<User> users = List.of(newUser("Julia", "Test"), newUser("Bretta", "Test"));
publicstaticStringvalue = """ [ {"insert": "High quality rich text editor for the web\\n", "attributes": {"header": 2}}, {"insert": "Rich text editor handles the following formatting:\\n"}, {"insert": "Bold\\n","attributes": { "bold": true, "list": "bullet" }}, {"insert": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\\n", "attributes": { "blockquote": true }}, {"insert": "Code blocks\\n", "attributes": { "header": 3 }}, {"insert": "<vaadin-rich-text-editor></vaadin-rich-text-editor>\\n", "attributes": { "code-block": true }} ] """;
publicTestView() {
Grid<User> grid = newGrid<>(User.class, false);
grid.addColumn(User::firstName).setHeader("Name");
grid.addColumn(User::lastName).setHeader("last name");
grid.setItemDetailsRenderer(createPersonDetailsRenderer());
grid.setItems(users);
add(grid);
}
privatestaticComponentRenderer<PersonDetailsFormLayout, User> createPersonDetailsRenderer() {
returnnewComponentRenderer<>(PersonDetailsFormLayout::new, PersonDetailsFormLayout::setPerson);
}
privatestaticclassPersonDetailsFormLayoutextendsFormLayout {
RichTextEditoreditor = newRichTextEditor();
publicPersonDetailsFormLayout() {
add(editor);
}
publicvoidsetPerson(Userperson) {
editor.asDelta().setValue(TestView.value);
}
}
}
Steps to reproduce
Add the snippet above
Click row to open its details
Environment
Vaadin version(s): 24.5.4
OS: windows
Browsers
Chrome
The text was updated successfully, but these errors were encountered:
Description
When a
RichTextEditor
used in details of a row, the value set viarte.asDelta().setValue('XY')
is ignored and null displayed insteadNote: this seems similar to this task #4551
Expected outcome
RTE has correct value displayed, not null
Minimal reproducible example
Steps to reproduce
Environment
Vaadin version(s): 24.5.4
OS: windows
Browsers
Chrome
The text was updated successfully, but these errors were encountered: