Skip to content

Commit d0ae11b

Browse files
committed
fix: combobox lazy load on initial load
1 parent 2d86021 commit d0ae11b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

packages/pluggableWidgets/combobox-web/CHANGELOG.md

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

1111
- We fixed an issue where combobox failed to render a proper width on auto-fit container.
1212

13+
- We fixed an issue where combobox lazy load is not working on initial load.
14+
1315
## [2.5.0] - 2025-08-12
1416

1517
### 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)