Skip to content

Conversation

@mkszepp
Copy link
Collaborator

@mkszepp mkszepp commented Dec 13, 2025

Backport of #1032 and add workaround to resolve a typing issue in the Trigger component when @htmltag="button" is passed.


To achieve full compatibility with template typing (Glint v2), it was necessary to move the @htmlTag property from the Trigger component to the main component, now exposed as @triggerHtmlTag.

If you are using <BasicDropdownTrigger @htmlTag="button">, no changes are required.

However, if you previously used the trigger like this:

<BasicDropdown as |dd|>
  <dd.Trigger @htmlTag="button">Click me!</dd.Trigger>
  <dd.Content>
    Content
  </dd.Content>
</BasicDropdown>

you must update it to:

<BasicDropdown @triggerHtmlTag="button" as |dd|>
  <dd.Trigger>Click me!</dd.Trigger>
  <dd.Content>
    Content
  </dd.Content>
</BasicDropdown>

This issue comes up, while moving to glint v2 (#1032). The typing will be improved in glint v2 branch

Note: Passing @htmlTag directly to the trigger still works at runtime, but it will produce a typing error.

@mkszepp mkszepp changed the title Backport @triggerHtmlTag and add workaround to resolve a typing issue when @htmlTag="button" is passed Add @triggerHtmlTag and add workaround to resolve a typing issue when @htmlTag="button" is passed Dec 13, 2025
@mkszepp mkszepp merged commit 3e4ae20 into v8 Dec 13, 2025
23 checks passed
@mkszepp mkszepp deleted the add-trigger-html-tag branch December 13, 2025 06:44
This was referenced Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants