Timeline for Why does a lightning-record-form display in edit mode the first time it's shown, but view mode on subsequent displays?
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 15, 2021 at 18:28 | vote | accept | Chuck | ||
Apr 15, 2021 at 16:14 | answer | added | Rahul Gawale | timeline score: 1 | |
Apr 15, 2021 at 16:03 | comment | added | Rahul Gawale | Yes, let me update that in the answer. | |
Apr 15, 2021 at 15:56 | comment | added | Chuck |
Perhaps it's relevant that clicking "Edit" means selecting that menu item from a datatable 's row actions? Is it possible to "unmount" the dialog during the close phase and "mount" it when I want it open? As you can probably tell, the dialog is shown by editing the class list.
|
|
Apr 15, 2021 at 15:40 | comment | added | Rahul Gawale |
Ahh so in that case you need to mount and unmount it when the record is changed. Using the if:true tag, so whenever the record id changes it will completely rerender itself.
|
|
Apr 15, 2021 at 15:36 | comment | added | Chuck | But this is true even if I bring up the dialog on a different record. So I click "Edit" (which brings up the edit dialog) for one record and it's in edit mode, then I do it for a different record and it's in view mode? | |
Apr 15, 2021 at 15:22 | comment | added | Rahul Gawale |
You can't do that and I think this is the ideal behavior, if you really want that always in edit mode then you can go with the record-edit-form instead.
|
|
Apr 15, 2021 at 15:01 | history | asked | Chuck | CC BY-SA 4.0 |