changelog prep

This commit is contained in:
carson 2020-11-25 17:41:00 -07:00
parent 29829fd776
commit 725bd72be2
2 changed files with 14 additions and 3 deletions

View File

@ -1,7 +1,18 @@
# Changelog
## [1.0.0] - 2020-12-?
## [1.0.1] - 2020-12-?
* AJAX file upload now correctly fires events, allowing for [a proper progress bar](https://htmx.org/examples/file-upload)
* htmx api functions that expect an element now can accept a string selector instead:
```js
htmx.on('#form', 'htmx:xhr:progress', function(evt) {
htmx.find('#progress').setAttribute('value', evt.detail.loaded/evt.detail.total * 100)
});
```
* htmx now properly handles the `multiple` attribute on `<select>` elements
## [1.0.0] - 2020-11-24
* Bumped the release version :)

View File

@ -17,7 +17,7 @@ First the pure javascript version.
* We listen for the `htmx:xhr:progress` event and update the `value` attribute of the progress bar based on the `loaded` and `total` properties in the even detail.
```html
<form hx-encoding='multipart/form-data' hx-post='/upload'>
<form id='form1' hx-encoding='multipart/form-data' hx-post='/upload'>
<input type='file' name='file'>
<button>
Upload
@ -25,7 +25,7 @@ First the pure javascript version.
<progress id='progress' value='0' max='100'></progress>
</form>
<script>
htmx.on('htmx:xhr:progress', function(evt) {
htmx.on('#form', 'htmx:xhr:progress', function(evt) {
htmx.find('#progress').setAttribute('value', evt.detail.loaded/evt.detail.total * 100)
});
</script>