Skip to content

Commit

Permalink
Fix vr tests in knockout
Browse files Browse the repository at this point in the history
  • Loading branch information
dk981234 committed Sep 7, 2023
1 parent 2d05f55 commit 59a305a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/question_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,17 @@ export class QuestionFileModel extends Question {
public get allowShowPreview(): boolean {
return this.previewValue && this.previewValue.length > 0 && !this.showLoadingIndicator;
}
get showRemoveButtonCore(): boolean {
const showLoadingIndicator = this.showLoadingIndicator;
const isReadOnly = this.isReadOnly;
const isEmpty = this.isEmpty();
return !isReadOnly && !isEmpty && !showLoadingIndicator;
}
get showRemoveButton(): boolean {
return !this.isReadOnly && !this.isEmpty() && !this.showLoadingIndicator && this.cssClasses.removeButton;
return this.showRemoveButtonCore && this.cssClasses.removeButton;
}
get showRemoveButtonBottom(): boolean {
return !this.isReadOnly && !this.isEmpty() && !this.showLoadingIndicator && this.cssClasses.removeButtonBottom;
return this.showRemoveButtonCore && this.cssClasses.removeButtonBottom;
}
defaultImage(data: any) {
return !this.canPreviewImage(data) && !!this.cssClasses.defaultImage;
Expand Down

0 comments on commit 59a305a

Please sign in to comment.