You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a component has markup that includes event handlers, Htmxor needs to be able unambiguously identify which event handler to invoke., e.g.:
These two are unambiguous because they reference the
same event handler method even though their hx-get attribute
has the same value.
<divhx-get="/"@hxget=@HandleGet />
<divhx-get="/"@hxget=@HandleGet />
These two are ambiguous because the event handlers (lambda)
are distinct and they share the same hx-get value.
Will cause Htmxor to throw.
<divhx-get="/page"@hxget=(() => {}) />
<divhx-get="/page"@hxget=(() => {}) />
These two are unambiguous because they reference
distinct event handlers and their hx-get attribute are different.
<divhx-get="/page2"@hxget=(() => {}) />
<divhx-get="/page3"@hxget=(() => {}) />
@code{privatevoidHandleGet(HtmxEventArgsargs) {}}
This works as illustrated above, i.e. based on the hx-ACTION's attribute value. However, this could be extended to include other unique attributes on the element the handler is attached to, e.g.:
ID of the element. These are expected to be unique.
Value passed to @key Blazor attribute. This is expected to be unique.
A fallback, e.g. custom hx-ACTION-key attribute.
This avoids users having to custom query parameter on their action URLs.
The text was updated successfully, but these errors were encountered:
When a component has markup that includes event handlers, Htmxor needs to be able unambiguously identify which event handler to invoke., e.g.:
This works as illustrated above, i.e. based on the hx-ACTION's attribute value. However, this could be extended to include other unique attributes on the element the handler is attached to, e.g.:
@key
Blazor attribute. This is expected to be unique.hx-ACTION-key
attribute.This avoids users having to custom query parameter on their action URLs.
The text was updated successfully, but these errors were encountered: