Skip to content

Commit

Permalink
Fixed surveyjs/survey-creator#5141 - Creator KO - New Progress bar UI…
Browse files Browse the repository at this point in the history
… is not working for Knockout
  • Loading branch information
tsv2013 committed Jan 31, 2024
1 parent 41eef39 commit e9a0848
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/knockout/components/progress/buttons.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as ko from "knockout";
import { ProgressButtons, ProgressButtonsResponsivityManager, IProgressButtonsViewModel } from "survey-core";
import { ProgressButtons, ProgressButtonsResponsivityManager, IProgressButtonsViewModel, SurveyModel } from "survey-core";
const template: any = require("html-loader?interpolate!val-loader!./buttons.html");

export class ProgressButtonsViewModel implements IProgressButtonsViewModel {
Expand All @@ -8,7 +8,7 @@ export class ProgressButtonsViewModel implements IProgressButtonsViewModel {
public canShowHeader = ko.observable(false);
public canShowFooter = ko.observable(false);
public canShowItemTitles = ko.observable(true);
constructor(private model: ProgressButtons, private element: HTMLElement, public container: string = "center") {
constructor(private model: ProgressButtons, private element: HTMLElement, public container: string = "center", public survey: SurveyModel) {
this.respManager = new ProgressButtonsResponsivityManager(model, element, this);
}
onResize(canShowItemTitles: boolean): void {
Expand Down Expand Up @@ -42,7 +42,8 @@ ko.components.register("sv-progress-buttons", {
return new ProgressButtonsViewModel(
params.model,
componentInfo.element.nextElementSibling,
params.container
params.container,
params.survey
);
},
},
Expand Down

0 comments on commit e9a0848

Please sign in to comment.