Skip to content

Commit

Permalink
FIO-5053: fixed an issue where select data with html5 widget type is …
Browse files Browse the repository at this point in the history
…not showing on view or pdf download after submission (formio#4700)
  • Loading branch information
AlexanderYakubovskiy authored May 6, 2022
1 parent 57ff9ba commit 62cd83f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ export default class SelectComponent extends Field {
return false;
}
// Live forms should always load.
if (!this.options.readOnly || (this.options.display === 'pdf' && this.options.readOnly)) {
if (!this.options.readOnly || ((this.options.display === 'pdf' || this.component.widget === 'html5') && this.options.readOnly)) {
return true;
}

Expand All @@ -564,7 +564,7 @@ export default class SelectComponent extends Field {
options = options || {};

// See if we should load items or not.
if (!this.shouldLoad || this.options.readOnly) {
if ((!this.shouldLoad || this.options.readOnly) && !(this.component.widget === 'html5' && this.root.submission.state === 'submitted')) {
this.isScrollLoading = false;
this.loading = false;
this.itemsLoadedResolve();
Expand Down

0 comments on commit 62cd83f

Please sign in to comment.