forked from ember-bootstrap/ember-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update bs-dropdown and related components to Glimmer component (ember…
- Loading branch information
1 parent
380d308
commit 94ed264
Showing
7 changed files
with
114 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,45 @@ | ||
{{#if this._isOpen}} | ||
{{#if this._renderInPlace}} | ||
<div | ||
class="dropdown-menu {{this.alignClass}} {{if this.isOpen "show"}}" | ||
tabindex="-1" | ||
...attributes | ||
{{popper-tooltip this.toggleElement this.popperOptions}} | ||
{{did-insert @registerChildElement "menu"}} | ||
{{will-destroy @unregisterChildElement "menu"}} | ||
{{create-ref "menuElement"}} | ||
> | ||
{{yield | ||
(hash | ||
item=(ensure-safe-component (bs-default @itemComponent (component "bs-dropdown/menu/item"))) | ||
link-to=(ensure-safe-component (bs-default @linkToComponent (component "bs-link-to" class="dropdown-item"))) | ||
linkTo=(ensure-safe-component (bs-default @linkToComponent (component "bs-link-to" class="dropdown-item"))) | ||
divider=(ensure-safe-component (bs-default @dividerComponent (component "bs-dropdown/menu/divider"))) | ||
) | ||
}} | ||
</div> | ||
{{else}} | ||
{{#in-element this.destinationElement insertBefore=null}} | ||
<div | ||
class="dropdown-menu {{this.alignClass}} {{if this.isOpen "show"}}" | ||
tabindex="-1" | ||
...attributes | ||
{{popper-tooltip this.toggleElement this.popperOptions}} | ||
{{did-insert @registerChildElement "menu"}} | ||
{{will-destroy @unregisterChildElement "menu"}} | ||
{{create-ref "menuElement"}} | ||
> | ||
{{yield | ||
(hash | ||
item=(ensure-safe-component (bs-default @itemComponent (component "bs-dropdown/menu/item"))) | ||
link-to=(ensure-safe-component (bs-default @linkToComponent (component "bs-link-to" class="dropdown-item"))) | ||
linkTo=(ensure-safe-component (bs-default @linkToComponent (component "bs-link-to" class="dropdown-item"))) | ||
divider=(ensure-safe-component (bs-default @dividerComponent (component "bs-dropdown/menu/divider"))) | ||
) | ||
}} | ||
</div> | ||
{{/in-element}} | ||
{{/if}} | ||
{{/if}} | ||
{{#if @isOpen}} | ||
{{#if this._renderInPlace}} | ||
<div | ||
class="dropdown-menu {{this.alignClass}} {{if this.isOpen "show"}}" | ||
tabindex="-1" | ||
...attributes | ||
{{popper-tooltip @toggleElement this.popperOptions}} | ||
{{did-insert @registerChildElement "menu"}} | ||
{{will-destroy @unregisterChildElement "menu"}} | ||
{{did-update this.updateIsOpen @open}} | ||
{{create-ref "menuElement"}} | ||
> | ||
{{yield | ||
(hash | ||
item=(ensure-safe-component (bs-default @itemComponent (component "bs-dropdown/menu/item"))) | ||
link-to=(ensure-safe-component (bs-default @linkToComponent (component "bs-link-to" class="dropdown-item"))) | ||
linkTo=(ensure-safe-component (bs-default @linkToComponent (component "bs-link-to" class="dropdown-item"))) | ||
divider=(ensure-safe-component (bs-default @dividerComponent (component "bs-dropdown/menu/divider"))) | ||
) | ||
}} | ||
</div> | ||
{{else}} | ||
{{#in-element this.destinationElement insertBefore=null}} | ||
<div | ||
class="dropdown-menu {{this.alignClass}} {{if this.isOpen "show"}}" | ||
tabindex="-1" | ||
...attributes | ||
{{popper-tooltip @toggleElement this.popperOptions}} | ||
{{did-insert @registerChildElement "menu"}} | ||
{{will-destroy @unregisterChildElement "menu"}} | ||
{{did-update this.updateIsOpen @open}} | ||
{{create-ref "menuElement"}} | ||
> | ||
{{yield | ||
(hash | ||
item=(ensure-safe-component (bs-default @itemComponent (component "bs-dropdown/menu/item"))) | ||
link-to=(ensure-safe-component (bs-default @linkToComponent (component "bs-link-to" class="dropdown-item"))) | ||
linkTo=(ensure-safe-component (bs-default @linkToComponent (component "bs-link-to" class="dropdown-item"))) | ||
divider=(ensure-safe-component (bs-default @dividerComponent (component "bs-dropdown/menu/divider"))) | ||
) | ||
}} | ||
</div> | ||
{{/in-element}} | ||
{{/if}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.