Problem/Motivation

https://getbootstrap.com/docs/5.3/components/dropdowns/#menu-alignment is not implemented in the dropdown component. It can be useful for dropdowns in mobile.

Need to check if other dropdown features are missing.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Grimreaper created an issue. See original summary.

grimreaper’s picture

Assigned: Unassigned » grimreaper
grimreaper’s picture

Currently by having a content prop of type links, this prevent features like https://getbootstrap.com/docs/5.3/components/dropdowns/#forms

I guess in some navigation menu / header, with custom code to generate such dropdowns, this can be useful to be able to support that. For login, search forms.

grimreaper’s picture

Uploading patch for Composer usage.

grimreaper’s picture

Assigned: grimreaper » pdureau
Status: Active » Needs work

@pdureau, can you please give a look at the MR and also about comment 3?

pdureau’s picture

Currently by having a content prop of type links, this prevent features like https://getbootstrap.com/docs/5.3/components/dropdowns/#forms

I would prefer to keep a convenient data structure with the links prop type, at the cost of not implementing every fetaure of this component.

pdureau’s picture

Assigned: pdureau » grimreaper

{% set dropdown_menu_attributes = dropdown_menu_start ? dropdown_menu_attributes.addClass(dropdown_menu_start) : dropdown_menu_attributes %}

Why do we need to test dropdown_menu_start ? What would be the result of {% set dropdown_menu_attributes = dropdown_menu_attributes.addClass(dropdown_menu_start) %} if dropdown_menu_start is empty or not defined?

grimreaper’s picture

Assigned: grimreaper » pdureau

Ready to merge.

Ok for you @pdureau?

grimreaper’s picture

Status: Needs work » Needs review
pdureau’s picture

Status: Needs review » Reviewed & tested by the community

Not tested but reviewed

pdureau’s picture

Assigned: pdureau » Unassigned

  • Grimreaper committed 89c14e15 on 5.0.x
    Issue #3426475 by Grimreaper, pdureau: Dropdown, implements menu...
grimreaper’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.