File tree 2 files changed +13
-1
lines changed
app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/image
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,8 @@ define([
86
86
form = modalElement . find ( '#image-edit-details-form' ) ,
87
87
imageId = this . imageModel ( ) . getSelected ( ) . id ,
88
88
keywords = this . mediaGalleryEditDetails ( ) . selectedKeywords ( ) ,
89
- imageDetails = this . mediaGalleryImageDetails ( ) ;
89
+ imageDetails = this . mediaGalleryImageDetails ( ) ,
90
+ imageEditDetails = this . mediaGalleryEditDetails ( ) ;
90
91
91
92
if ( form . validation ( 'isValid' ) ) {
92
93
saveDetails (
@@ -98,6 +99,7 @@ define([
98
99
this . closeModal ( ) ;
99
100
this . imageModel ( ) . reloadGrid ( ) ;
100
101
imageDetails . removeCached ( imageId ) ;
102
+ imageEditDetails . removeCached ( imageId , keywords ) ;
101
103
102
104
if ( imageDetails . isActive ( ) ) {
103
105
imageDetails . showImageDetailsById ( imageId ) ;
Original file line number Diff line number Diff line change @@ -223,6 +223,16 @@ define([
223
223
}
224
224
225
225
return true ;
226
+ } ,
227
+
228
+ /**
229
+ * Remove cached image details in edit form
230
+ *
231
+ * @param {String } id
232
+ * @param {String } tags
233
+ */
234
+ removeCached : function ( id , tags ) {
235
+ this . images [ id ] . tags = tags ;
226
236
}
227
237
} ) ;
228
238
} ) ;
You can’t perform that action at this time.
0 commit comments