Skip to content

Commit d5dcb89

Browse files
committed
[Bug Fix] Fix DropdownMenu docs example: replace nonexistent DialogClose
The 'Non-navigational item' example (added in #427) referenced a DialogClose component that does not exist in the gem. VisualCodeExample evaluates the snippet at render time, so it raised NoMethodError and the whole /docs/dropdown_menu page failed to render. Close the dialog with the documented pattern instead: a Button wired to click->ruby-ui--dialog#dismiss (same approach used in dialog_docs.rb). Fixes #428
1 parent d799b7a commit d5dcb89

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/app/views/docs/dropdown_menu.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def view_template
4343
DialogDescription { "This action cannot be undone." }
4444
end
4545
DialogFooter do
46-
DialogClose { Button(variant: :destructive) { "Delete" } }
46+
Button(variant: :destructive, data: { action: 'click->ruby-ui--dialog#dismiss' }) { "Delete" }
4747
end
4848
end
4949
end

0 commit comments

Comments
 (0)