Skip to content

Commit

Permalink
SVYX-776 svyPopFilter - adding custom foundset isn't working, it alwa…
Browse files Browse the repository at this point in the history
…ys uses the form foundset
  • Loading branch information
RvVeen committed Jan 18, 2024
1 parent 7bc6333 commit c75c1bc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions svyPopupFilter/svyToolbarFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,15 @@ function initPopupRendererForms() {

/**
* @param {RuntimeComponent} uiComponent
* @param {JSFoundSet} customFs
*
* @private
* @constructor
* @this {AbstractToolbarFilterUX}
* @properties={typeid:24,uuid:"D21B3F79-9C77-4006-8A82-95AA24DC56AA"}
* @AllowToRunInFind
*/
function AbstractToolbarFilterUX(uiComponent) {
function AbstractToolbarFilterUX(uiComponent, customFs) {

/**
* @protected
Expand Down Expand Up @@ -449,6 +450,12 @@ function AbstractToolbarFilterUX(uiComponent) {
* @type {Array<Filter>}
*/
this.filters = [];

/**
* @protected
* @type {JSFoundSet}
*/
this.customFoundset = customFs;

/**
* @protected
Expand Down Expand Up @@ -525,7 +532,7 @@ function ListComponentFilterRenderer(listComponent, foundsetToFilter) {
throw "The given listComponent element should be an element of type customrenderedcomponents-customlist; check the 'Custom List' from the Custom Rendered Components package";
}

AbstractToolbarFilterUX.call(this, listComponent);
AbstractToolbarFilterUX.call(this, listComponent, foundsetToFilter);

/**
* @protected
Expand Down Expand Up @@ -2279,7 +2286,7 @@ function initAbstractToolbarFilterUX() {
* @this {AbstractToolbarFilterUX}
*/
AbstractToolbarFilterUX.prototype.getFoundSet = function() {
return forms[this.formName].foundset;
return this.customFoundset||forms[this.formName].foundset;
}

/**
Expand Down

0 comments on commit c75c1bc

Please sign in to comment.