survey-js-ui 2.5.19 → 2.5.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-js-ui",
3
- "version": "2.5.19",
3
+ "version": "2.5.21",
4
4
  "license": "MIT",
5
5
  "description": "A free MIT-licensed UI component that renders dynamic, interactive JSON-based forms and surveys in apps built with HTML, CSS, and JavaScript. You can use it to collect responses from users and send them to your own database.",
6
6
  "homepage": "https://surveyjs.io/",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {},
55
55
  "peerDependencies": {
56
- "survey-core": "2.5.19",
56
+ "survey-core": "2.5.21",
57
57
  "@types/react-dom": "*",
58
58
  "@types/react": "*"
59
59
  }
package/survey-js-ui.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v2.5.19
2
+ * surveyjs - Survey JavaScript library v2.5.21
3
3
  * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -4299,12 +4299,13 @@
4299
4299
  return this.questionBase.renderedValue;
4300
4300
  };
4301
4301
  SurveyQuestionDropdownBase.prototype.renderReadOnlyElement = function () {
4302
+ if (this.question.showInputFieldComponent) {
4303
+ return (_$1("div", { className: this.question.cssClasses.controlValue }, this.renderValueElement()));
4304
+ }
4302
4305
  if (this.question.readOnlyText) {
4303
4306
  return (_$1("div", { className: this.question.cssClasses.controlValue }, this.renderLocString(this.question.locReadOnlyText)));
4304
4307
  }
4305
- else {
4306
- return null;
4307
- }
4308
+ return null;
4308
4309
  };
4309
4310
  SurveyQuestionDropdownBase.prototype.renderSelect = function (cssClasses) {
4310
4311
  var _this = this;
@@ -4326,7 +4327,9 @@
4326
4327
  };
4327
4328
  SurveyQuestionDropdownBase.prototype.renderValueElement = function () {
4328
4329
  if (this.question.showInputFieldComponent) {
4329
- return ReactElementFactory.Instance.createElement(this.question.inputFieldComponentName, { item: this.dropdownListModel.getSelectedAction(), question: this.question });
4330
+ var listModel = this.dropdownListModel;
4331
+ var actionItem = !!listModel ? listModel.getSelectedAction() : this.question.selectedItem;
4332
+ return ReactElementFactory.Instance.createElement(this.question.inputFieldComponentName, { item: actionItem, question: this.question });
4330
4333
  }
4331
4334
  else if (this.question.showSelectedItemLocText) {
4332
4335
  return this.renderLocString(this.question.selectedItemLocText);
@@ -7942,7 +7945,7 @@
7942
7945
  }
7943
7946
  };
7944
7947
  var preact = React;
7945
- surveyCore.checkLibraryVersion("".concat("2.5.19"), "survey-js-ui");
7948
+ surveyCore.checkLibraryVersion("".concat("2.5.21"), "survey-js-ui");
7946
7949
 
7947
7950
  Object.defineProperty(exports, "Model", {
7948
7951
  enumerable: true,