Allow stream action to expand into multiple actions

e.g. by including 'onclick()' event handler
This commit is contained in:
2024-02-04 20:05:36 +01:00
parent e95448ce9f
commit 76aae56ed5
4 changed files with 53 additions and 4 deletions

View File

@@ -15,7 +15,19 @@ ActiveSupport.on_load :turbo_streams_tag_builder do
action_all :enable, targets, allow_inferred_rendering: false
end
def blur_all
action :blur, nil, allow_inferred_rendering: false
end
def focus(target)
action :focus, target, allow_inferred_rendering: false
end
def click(target)
action :click, target, allow_inferred_rendering: false
end
def click_all(targets)
action_all :click, targets, allow_inferred_rendering: false
end
end