Skip to content

v2.0.2

Latest

Choose a tag to compare

@axadrn axadrn released this 01 Dec 08:22
· 2 commits to main since this release

In short: Tooltips, hover cards and dialogs keep working after an htmx morph when they have no fixed ID.

Fixed

  • Tooltip, Hover Card: a morph no longer throws Cannot read properties of null and the new content opens on hover. Thanks @richardrigby for the detailed analysis.
  • Dialog, Alert Dialog, Sheet: a morph no longer removes the new dialog, its trigger keeps working.

Upgrade

go get github.com/axadrn/shadcn-templ/v2@latest
go install github.com/axadrn/shadcn-templ/v2/cmd/shadcn-templ@latest
shadcn-templ add tooltip hover-card dialog --overwrite

Alert dialog and sheet share the dialog's script, re-adding dialog covers them. --overwrite replaces your local edits in those files.