Releases: alpinejs/alpine
Releases · alpinejs/alpine
v1.9.7
v1.9.6
v1.9.5
Fixed
- Nested components were being registered twice on initialization.
v1.9.4
Added
$dispatch
magic function for dispatchingnew CustomEvent
s easily:
<div x-data="{ foo: 'bar' }" x-on:custom-event="foo = $event.detail.newValue">
<span x-text="foo"></span>
<button x-on:click="$dispatch('custom-event', {newValue: 'baz'})">Turn 'bar' to 'baz'</button>
</div>
Fixed
v1.9.3
v1.9.2
Fixed
x-on:keydown.enter.prevent
was "preventDefault"ing for every key pressed, not just for the enter key. Fixed now.
v1.9.1
Fixed
x-on:
listeners inside loop were not lazily evaluating the value of an iteration alias inside a loop. Fixed now.
v1.9.0
Added
x-for
directive with:key
binding on<template>
tag. This uses a similar strategy asx-if
(appending real dom nodes after the template tag, and re-evaluating them when data updates)
<template x-for="item in items" :key="item">
<div x-text="item"></div>
</template>
Fixed
- Non-root x-data elements are now being initialized by the root mutation observer.
v1.8.2
Added
- System modifier key-combos:
<input type="text" x-data @keydown.cmd.k="doSomething">
(only fires when bothcmd
ANDk
are pressed)