File tree Expand file tree Collapse file tree 4 files changed +4
-15
lines changed
Expand file tree Collapse file tree 4 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -15,21 +15,13 @@ def view_template(&)
1515
1616 def default_attrs
1717 {
18- class : [
19- "z-50" ,
20- "group/dropdown-menu" ,
21- ( strategy == "absolute" ) ? "is-absolute" : "is-fixed"
22- ] ,
18+ class : "z-50" ,
2319 data : {
2420 controller : "ruby-ui--dropdown-menu" ,
2521 action : "click@window->ruby-ui--dropdown-menu#onClickOutside" ,
2622 ruby_ui__dropdown_menu_options_value : @options . to_json
2723 }
2824 }
2925 end
30-
31- def strategy
32- @_strategy ||= @options [ :strategy ] || "absolute"
33- end
3426 end
3527end
Original file line number Diff line number Diff line change @@ -21,10 +21,7 @@ def default_attrs
2121
2222 def wrapper_attrs
2323 {
24- class : [
25- "z-50 hidden group-[.is-absolute]/dropdown-menu:absolute" ,
26- "group-[.is-fixed]/dropdown-menu:fixed"
27- ] ,
24+ class : "z-50 hidden absolute" ,
2825 data : { ruby_ui__dropdown_menu_target : "content" } ,
2926 style : {
3027 width : "max-content" ,
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export default class extends Controller {
4545 computePosition ( this . triggerTarget , this . contentTarget , {
4646 placement : this . optionsValue . placement || "top" ,
4747 middleware : [ flip ( ) , shift ( ) , offset ( 8 ) ] ,
48- strategy : this . optionsValue . strategy || "absolute" ,
48+ strategy : "absolute" ,
4949 } ) . then ( ( { x, y } ) => {
5050 Object . assign ( this . contentTarget . style , {
5151 left : `${ x } px` ,
Original file line number Diff line number Diff line change 33module RubyUI
44 class Table < Base
55 def view_template ( &block )
6- div ( class : "relative w-full overflow-auto" ) do
6+ div ( class : "relative w-full overflow-x- auto" ) do
77 table ( **attrs , &block )
88 end
99 end
You can’t perform that action at this time.
0 commit comments