Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Tinebase/js): resolve felamimail allinboxes filter value
Browse files Browse the repository at this point in the history
  • Loading branch information
ccheng-dev committed Mar 15, 2023
1 parent f5a70ba commit a88e19c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tine20/Felamimail/js/FolderFilterModel.js
Expand Up @@ -48,14 +48,14 @@ Tine.Felamimail.FolderFilterModel = Ext.extend(Tine.widgets.grid.PickerFilter, {
return this.selectionWidget.selectPanel && ! this.selectionWidget.selectPanel.isDestroyed
},
getRecordText: function(value) {
var path = (Ext.isString(value)) ? value : (value.path) ? value.path : '/' + value.id,
index = this.valueStore.findExact('path', path),
record = this.valueStore.getAt(index),
text = null;
const path = (Ext.isString(value)) ? value : (value.path) ? value.path : '/' + value.id;
const index = this.valueStore.findExact('path', path);
let record = this.valueStore.getAt(index);
let text = path;

if (! record) {
// try account
var accountId = path.substr(1, 40);
const accountId = path.substring(1, 40);
record = this.app.getAccountStore().getById(accountId);
}
if (record) {
Expand All @@ -64,8 +64,7 @@ Tine.Felamimail.FolderFilterModel = Ext.extend(Tine.widgets.grid.PickerFilter, {
this.store.add(record.copy());
text = this.labelRenderer(record.id, {}, record);
} else {
text = value;
this.currentValue.push(value);
this.currentValue.push(text);
}

return text;
Expand Down

0 comments on commit a88e19c

Please sign in to comment.