@unvired/turboforms-embed-sdk 2.0.77 → 2.0.78

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.
@@ -37298,8 +37298,9 @@ class SmartSelectComponent extends SmartSelectField {
37298
37298
  let selData;
37299
37299
  let dataObj = {}
37300
37300
  dataObj.limit = this.component.limit;
37301
+ const masterdataList = this.filteredMasterdata;
37301
37302
  if (this.data[this.key] && String(this.data[this.key]).length > 0) {
37302
- selData = this.component.masterdata.filter((value) => {
37303
+ selData = masterdataList.filter((value) => {
37303
37304
  const propValue = value[this.component.valueProperty];
37304
37305
  // Convert to string only if necessary
37305
37306
  const valPropData = typeof propValue !== 'string' ? String(propValue) : propValue;
@@ -37316,7 +37317,7 @@ class SmartSelectComponent extends SmartSelectField {
37316
37317
  }
37317
37318
  }
37318
37319
  dataObj = this.defaultDownloadedResources;
37319
- dataObj.serverCount = this.component.masterdata.length;
37320
+ dataObj.serverCount = masterdataList.length;
37320
37321
  dataObj.skip = this.defaultDownloadedResources.length + this.component.limit;
37321
37322
  this.setItems(this.defaultDownloadedResources);
37322
37323
  }
@@ -37366,7 +37367,7 @@ class SmartSelectComponent extends SmartSelectField {
37366
37367
  if ((this.component.dataSrc === 'masterdata') && this.component.masterdata) {
37367
37368
  this.component.dropdownOpened = true;
37368
37369
  // Force reloading the full list if we currently only have a partial list (e.g. filtered down on hideDropdown)
37369
- if (!this.defaultDownloadedResources || this.defaultDownloadedResources.length < this.component.masterdata.length) {
37370
+ if (!this.defaultDownloadedResources || this.defaultDownloadedResources.length < this.filteredMasterdata.length) {
37370
37371
  this.updateItems(null, true);
37371
37372
  }
37372
37373
  }
@@ -37586,11 +37587,11 @@ class SmartSelectComponent extends SmartSelectField {
37586
37587
  }
37587
37588
 
37588
37589
  onScroll(ev) {
37589
- if ((this.component.dataSrc === 'masterdata') && this.component.masterdata && (this.defaultDownloadedResources.length < this.component.masterdata.length)) {
37590
+ if (this.isFromSearch) {
37591
+ return; // Do not trigger scroll loading or reset items while a search is active
37592
+ }
37593
+ if ((this.component.dataSrc === 'masterdata') && this.component.masterdata && (this.defaultDownloadedResources.length < this.filteredMasterdata.length)) {
37590
37594
  var element = ev.target;
37591
- if (this.isFromSearch && this.component.totalSearchResults && this.component.totalSearchResults.length == 0) {
37592
- return;
37593
- }
37594
37595
  if (browserPlatform) {
37595
37596
  if (element.scrollHeight - element.scrollTop === element.clientHeight) {
37596
37597
  this.isScrollLoading = true;
@@ -45429,7 +45430,7 @@ initThemeHook();
45429
45430
  </div>
45430
45431
 
45431
45432
  <div id="sticky-footer">
45432
- <div class="build-version">SDK v2.0.77</div>
45433
+ <div class="build-version">SDK v2.0.78</div>
45433
45434
 
45434
45435
  <button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
45435
45436
  <i class="bi bi-chevron-left"></i> Previous