Skip to content

Commit dc767d7

Browse files
committed
fix: combobox lazy load on initial load
1 parent b3e8015 commit dc767d7

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

packages/pluggableWidgets/combobox-web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- We fixed an issue where combobox lazy load is not working on initial load.
12+
913
## [2.5.0] - 2025-08-12
1014

1115
### Added

packages/pluggableWidgets/combobox-web/src/helpers/Database/DatabaseSingleSelectionSelector.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,17 @@ export class DatabaseSingleSelectionSelector<T extends string | Big, R extends E
5555
valueSourceAttribute
5656
} = extractDatabaseProps(props);
5757

58-
if (ds.status === "loading") {
59-
return;
60-
}
6158
this._attr = targetAttribute as R;
6259
this.readOnly = getReadonly(targetAttribute, props.customEditability, props.customEditabilityExpression);
6360
this.lazyLoader.updateProps(ds);
6461
this.lazyLoader.setLimit(
6562
this.lazyLoader.getLimit(ds.limit, this.readOnly, targetAttribute?.status ?? ds.status, lazyLoading)
6663
);
6764

65+
if (ds.status === "loading") {
66+
return;
67+
}
68+
6869
this.caption.updateProps({
6970
emptyOptionText: emptyOption,
7071
formattingAttributeOrExpression: captionProvider,

packages/pluggableWidgets/combobox-web/src/helpers/LazyLoadProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class LazyLoadProvider {
1818
getLimit(limit: number, readOnly: boolean, status: ValueStatus, lazyLoading: boolean): number | undefined {
1919
if (status !== "available" || readOnly === true) {
2020
if (status === "loading" && lazyLoading) {
21-
return this.limit || 1;
21+
return this.limit === Infinity || !this.limit ? 1 : this.limit;
2222
}
2323
return 0;
2424
}

0 commit comments

Comments
 (0)