Skip to content

Commit

Permalink
fix issue with 'input' event
Browse files Browse the repository at this point in the history
  • Loading branch information
rikschennink committed Jul 19, 2019
1 parent b264239 commit d3944e7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 5.1.2

- Fix issue with 'input' event.


## 5.1.1

- Add `detached` method, the component now waits to be removed from the DOM, it then destroys the FilePond instance (the `destroyed` and `beforeDestroy` methods both run while the component is still in the DOM when using transitions).
Expand Down
8 changes: 2 additions & 6 deletions dist/vue-filepond.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* vue-filepond v5.1.1
* vue-filepond v5.1.2
* A handy FilePond adapter component for Vue
*
* Copyright (c) 2019 PQINA
Expand Down Expand Up @@ -135,11 +135,7 @@ export default (...plugins) => {
// Map FilePond callback methods to Vue $emitters
const options = events.reduce((obj, value) => {
obj[value] = (...args) => {
if(this._pond){
this.$emit('input', this._pond.getFiles());
}else{
this.$emit('input', []);
}
this.$emit('input', this._pond ? this._pond.getFiles() : []);
this.$emit(value.substr(2), ...args);
};
return obj;
Expand Down
8 changes: 2 additions & 6 deletions dist/vue-filepond.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* vue-filepond v5.1.1
* vue-filepond v5.1.2
* A handy FilePond adapter component for Vue
*
* Copyright (c) 2019 PQINA
Expand Down Expand Up @@ -150,11 +150,7 @@
args[_key] = arguments[_key];
}

if (_this._pond) {
_this.$emit('input', _this._pond.getFiles());
} else {
_this.$emit('input', []);
}
_this.$emit('input', _this._pond ? _this._pond.getFiles() : []);
_this.$emit.apply(_this, [value.substr(2)].concat(args));
};
return obj;
Expand Down
4 changes: 2 additions & 2 deletions dist/vue-filepond.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-filepond",
"version": "5.1.1",
"version": "5.1.2",
"description": "A handy FilePond adapter component for Vue",
"homepage": "https://pqina.nl/filepond",
"license": "MIT",
Expand Down

0 comments on commit d3944e7

Please sign in to comment.