-
I have a action/page pair like this: # some action
class Htmx::Foo < BrowserAction
# ...
html(
Htmx::FooPage,
id: university.id.to_s,
column_name: param_value[0],
column_value: param_value[1],
action: "/htmx/foo"
)
end
# ... class Htmx::FooPage < NoLayout
needs id : String
needs column_name : String
needs column_value : String
needs action : String
def content
mount(
ClickEditTD,
id: id,
column_value: column_value,
column_name: column_name,
action: action,
tooltip: show_ranking_number(column_value)
)
end
end As you can see, this action used with htmx, the only purpose is, pass all args into view, Can we mount the component in the action diretly instead? For this use cases (work with htmx), render use i have to create a new |
Beta Was this translation helpful? Give feedback.
Answered by
jwoertink
May 9, 2024
Replies: 1 comment 3 replies
-
You can call class Htmx::Foo < BrowserAction
# ...
component(
ClickEditTD,
id: university.id.to_s,
column_name: param_value[0],
column_value: param_value[1],
action: "/htmx/foo"
)
end |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
zw963
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can call
component
fromBrowserAction
. https://luckyframework.org/guides/http-and-routing/request-and-response#handling-responses