-
Hi, I have an application with several tenant. Every tenant has a public page that is basically What are the recommended way to do this ? Currently I did: url: %{
module: Backpex.Fields.URL,
label: "URL",
except: [:edit],
select: dynamic([band: b], fragment("concat(?, ?)", "/tenant/", b.slug))
} but it feels hacky. Is there a way to manipulate the structure after the query has been done? I expect to be able to do something like this: url: %{
module: Backpex.Fields.URL,
label: "URL",
except: [:edit],
computed: fn tenant ->
~p"/tenant/#{tenant.slug}"
end
} Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Maybe use the |
Beta Was this translation helpful? Give feedback.
-
Thanks @pehbehbeh for the workaround. Here is the code I came up with. The
It still feels hacky as I have to specify a module that is not used in my case. I also had to wrap the Anyway, it works for me, thanks. |
Beta Was this translation helpful? Give feedback.
Thanks @pehbehbeh for the workaround.
Here is the code I came up with. The
render
function receives theassigns
and theassigns
store theitem
that is the struct.It still feels hacky as I have to specify a module that is not used in my case. I also had to wrap the
link
component into an html tag. Without that wrapper, I received the following error:Stateful components must have a sin…