mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-02 07:21:05 +00:00
changelog prep
This commit is contained in:
parent
29829fd776
commit
725bd72be2
13
CHANGELOG.md
13
CHANGELOG.md
@ -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 :)
|
||||
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user