Skip to content

Commit

Permalink
fix: backend voucher codes search reset on reload
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominikrt committed Apr 30, 2024
1 parent 10481b3 commit 1753c53
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 8 additions & 1 deletion themes/Backend/ExtJs/backend/voucher/controller/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,15 @@ Ext.define('Shopware.apps.Voucher.controller.Code', {
var me = this,
searchString = Ext.String.trim(value),
store = me.subApplication.getStore('Code');
store.filter('filter', searchString);

store.filters.clear();

if (searchString.length <= 0) {
store.load();
return
}

store.filter('filter', searchString);
},

/**
Expand Down
7 changes: 5 additions & 2 deletions themes/Backend/ExtJs/backend/voucher/controller/voucher.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,14 @@ Ext.define('Shopware.apps.Voucher.controller.Voucher', {
scope: this,
callback: function (records, operation, success) {
var record = records[0],
mode = record.data.modus;
mode = record.data.modus,
codeStore = me.getStore('Code');

codeStore.filters.clear();

me.getView('voucher.Window').create({
record: record,
codeStore: me.getStore('Code'),
codeStore: codeStore,
taxStore: me.getStore('Tax')
});

Expand Down

0 comments on commit 1753c53

Please sign in to comment.