Is it possible to use rad report for a single entity? I have a case where the user is directed to an item detail screen from a report list with (rroute/route-to! this EntityItem {:property/id id}) where EntityItem is a report component.
I’ll give that a shot tomorrow.
@tony.kay whats the right way to route to and from a read-only vs an editable form?
Here's what I have tried so far:
1. Created separate desc-form components for a detail view and form view with different routes. Example: PropertyDetail (read-only, different UI) and PropertyForm (form layout with inputs). While this works, I get a UISM event warning when navigating between the forms. My best guess is because they share the same UISM id (something like [:property/id #uuid "XYZ...."]).
2. Single defsc-form component that conditionally renders the form or detail view with (form/view-mode? this) boolean value. I use either form/edit! or form/view! to route to the preferred view. This works as well, however there's a quick flash of the detail UI when routing away from the input view to some other route.
2 is the intended use-case.
the “quick flash” could be fixed as a patch to the UISM..probably should assume it is read only by default, so that it shows that way until proven otherwise, which would cause it to flicker in the other direction perhaps.
Awesome. Approach #2 seamed like the correct to me as well. I took a look at the rad form UISM internals a bit to see if I could update the default action. Let me know if you want to pair on it.