Skip to content

Commit 65c5d0a

Browse files
web-padawanclaude
andauthored
feat: wait for loading to finish in ComboBoxElement getOptions (#10198)
## Description Follow-up to #10189 - Changed `ComboBoxElement.getOptions()` to call `waitForLoadingFinished()` after opening the popup, same as `MultiSelectComboBoxElement.getOptions()` ## Type of change - Feature 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 2be6fb4 commit 65c5d0a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • vaadin-combo-box-flow-parent/vaadin-combo-box-testbench/src/main/java/com/vaadin/flow/component/combobox/testbench

‎vaadin-combo-box-flow-parent/vaadin-combo-box-testbench/src/main/java/com/vaadin/flow/component/combobox/testbench/ComboBoxElement.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public boolean isPopupOpen() {
129129

130130
/**
131131
* Gets the labels of the items that are currently loaded in the popup.
132-
* Opens the popup if it is not open.
132+
* Opens the popup if it is not open, and waits until loading has finished.
133133
* <p>
134134
* The popup only holds the pages that are loaded so far. Items outside them
135135
* are placeholders with an empty label.
@@ -139,6 +139,7 @@ public boolean isPopupOpen() {
139139
@SuppressWarnings("unchecked")
140140
public List<String> getOptions() {
141141
openPopup();
142+
waitForLoadingFinished();
142143
return (List<String>) executeScript("var combobox=arguments[0];" //
143144
+ "return combobox.filteredItems.map(function(item) { return combobox._getItemLabel(item);});",
144145
this);

0 commit comments

Comments
 (0)