Skip to content

Commit

Permalink
Features/6190 filter panel dynamic (#6191)
Browse files Browse the repository at this point in the history
* Add visiblePanels property #6190

* Refactor currentIndex #6190

* Use visiblePanels #6190

* Fix issue with add button #6190

* Fix unit test #6190

* templateVisibleIf & additionalTitleToolbar #6190

* FIx unit test #6190

* Add functional test #6190
  • Loading branch information
andrewtelnov authored May 16, 2023
1 parent be0b662 commit a476b5e
Show file tree
Hide file tree
Showing 5 changed files with 331 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AngularComponentFactory } from "../component-factory";
})
export class PanelDynamicQuestionComponent extends QuestionAngular<QuestionPanelDynamicModel | any> implements OnInit {
get renderedPanels(): PanelModel[] {
if (this.model.isRenderModeList) return this.model.panels;
if (this.model.isRenderModeList) return this.model.visiblePanels;
const panels = [];
if (this.model.currentPanel) {
panels.push(this.model.currentPanel);
Expand Down
2 changes: 1 addition & 1 deletion src/knockout/koquestion_paneldynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class QuestionPanelDynamicImplementor extends QuestionImplementor {
"koRangeMax",
ko.pureComputed(() => {
this.koRecalc();
return this.question.panelCount - 1;
return this.question.visiblePanelCount - 1;
})
);

Expand Down
Loading

0 comments on commit a476b5e

Please sign in to comment.