Skip to content

Commit 1a69e73

Browse files
committed
changed onclick to render an a tag instead of a div tag in order to have an inline element like seen on action and transition
1 parent b035eec commit 1a69e73

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/matestack/ui/vue_js/components/onclick.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ class Onclick < Matestack::Ui::VueJs::Vue
88
optional :emit, :data
99

1010
def response
11-
div onclick_attributes do
11+
a onclick_attributes do
1212
yield
1313
end
1414
end
1515

1616
def onclick_attributes
1717
options.merge({
18-
class: "matestack-onclick-component-root",
19-
'@click': 'perform'
18+
class: "matestack-onclick-component-root",
19+
'@click.prevent': 'perform',
20+
href: "#"
2021
})
2122
end
2223

@@ -33,4 +34,4 @@ def vue_props
3334
end
3435
end
3536
end
36-
end
37+
end

0 commit comments

Comments
 (0)