Skip to content

Commit cd99278

Browse files
committed
move silent bool to DID_UPDATE_ITEM_METADATA action handler
1 parent fd5993e commit cd99278

10 files changed

Lines changed: 90 additions & 104 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 4.26.2
4+
5+
- `setMetadata` internal `silent` bool now does fire internal `DID_UPDATE_ITEM_METADATA` but doesn't trigger upload or file prepare logic. This fixes an issue with the new image editor and file poster plugins.
6+
37
## 4.26.1
48

59
- Add metdata change info to internal `SHOULD_PREPARE_OUTPUT` call

dist/filepond.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* FilePond 4.26.1
2+
* FilePond 4.26.2
33
* Licensed under MIT, https://opensource.org/licenses/MIT/
44
* Please visit https://pqina.nl/filepond/ for details.
55
*/

dist/filepond.esm.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* FilePond 4.26.1
2+
* FilePond 4.26.2
33
* Licensed under MIT, https://opensource.org/licenses/MIT/
44
* Please visit https://pqina.nl/filepond/ for details.
55
*/
@@ -3807,13 +3807,11 @@ const createItem = (origin = null, serverFileReference = null, file = null) => {
38073807
// update value
38083808
data[last] = value;
38093809

3810-
// don't fire update
3811-
if (silent) return;
3812-
38133810
// fire update
38143811
fire('metadata-update', {
38153812
key: root,
38163813
value: metadata[root],
3814+
silent,
38173815
});
38183816
};
38193817

@@ -4051,6 +4049,9 @@ const actions = (dispatch, query, state) => ({
40514049
},
40524050

40534051
DID_UPDATE_ITEM_METADATA: ({ id, action, change }) => {
4052+
// don't do anything
4053+
if (change.silent) return;
4054+
40544055
// if is called multiple times in close succession we combined all calls together to save resources
40554056
clearTimeout(state.itemUpdateTimeout);
40564057
state.itemUpdateTimeout = setTimeout(() => {

dist/filepond.esm.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/filepond.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* FilePond 4.26.1
2+
* FilePond 4.26.2
33
* Licensed under MIT, https://opensource.org/licenses/MIT/
44
* Please visit https://pqina.nl/filepond/ for details.
55
*/
@@ -5995,13 +5995,11 @@
59955995
// update value
59965996
data[last] = value;
59975997

5998-
// don't fire update
5999-
if (silent) return;
6000-
60015998
// fire update
60025999
fire('metadata-update', {
60036000
key: root,
60046001
value: metadata[root],
6002+
silent: silent,
60056003
});
60066004
};
60076005

@@ -6342,6 +6340,9 @@
63426340
var id = _ref3.id,
63436341
action = _ref3.action,
63446342
change = _ref3.change;
6343+
// don't do anything
6344+
if (change.silent) return;
6345+
63456346
// if is called multiple times in close succession we combined all calls together to save resources
63466347
clearTimeout(state.itemUpdateTimeout);
63476348
state.itemUpdateTimeout = setTimeout(function() {

dist/filepond.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/filepond.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "filepond",
3-
"version": "4.26.1",
3+
"version": "4.26.2",
44
"description": "FilePond, Where files go to stretch their bits.",
55
"license": "MIT",
66
"author": {

src/js/app/actions.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ export const actions = (dispatch, query, state) => ({
128128
},
129129

130130
DID_UPDATE_ITEM_METADATA: ({ id, action, change }) => {
131+
// don't do anything
132+
if (change.silent) return;
133+
131134
// if is called multiple times in close succession we combined all calls together to save resources
132135
clearTimeout(state.itemUpdateTimeout);
133136
state.itemUpdateTimeout = setTimeout(() => {

0 commit comments

Comments
 (0)