A depends-on picker no longer offers the unnarrowed list while the page loads - #7675
Merged
delchev merged 1 commit intoOct 5, 2026
Conversation
…ge loads `loadOptions()` fetched the whole target table for every dropdown and the cascade narrowed it only once the record load had finished, so a depends-on picker spent the entire init offering rows its trigger goes on to refuse - a user quick enough to pick one got a server rejection for a choice the page had just shown as valid. The per-property fetch moves into its own `loadAllOptions<Name>()`. For a depends-on dropdown `loadOptions(deferDependsOn)` calls the new `refreshOptions<Name>()` instead - narrowed while the trigger holds a value, whole while it does not - and `init()` passes `deferDependsOn` so the list is decided exactly once, after the record load or the URL prefill has put the trigger in the form, by the same catch-up that registers the watcher (eclipse-dirigible#7604). No trigger at all means the whole list; clearing the trigger returns to it. The init that the picker was waiting out also got shorter: `ensureFilteredCurrent` resolved every stored off-filter key with its own awaited GET, so a MULTISELECT holding a few hundred keys cost that many serial round trips before the page could continue. They now go out together through `Promise.all`. Fixes eclipse-dirigible#7669 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7669
loadOptions()fetched the whole target table for every dropdown and the cascade narrowed it only once the record load had finished. A depends-on picker therefore spent the whole page init offering rows its trigger goes on to refuse, and a user quick enough to pick one got a server rejection for a choice the page had just shown as valid.The list is decided once, when the trigger is known. The per-property fetch moves into its own
loadAllOptions<Name>(). For a depends-on dropdown,loadOptions(deferDependsOn)calls the newrefreshOptions<Name>()instead — narrowed while the trigger holds a value, whole while it does not.init()passesdeferDependsOn, so nothing is fetched for that picker until the record load or the URL prefill has put the trigger in the form, and the same catch-up that registers the watcher (#7604) then picks the right list. No trigger at all means the whole list, and clearing the trigger returns to it. Every other caller (addRelated) keeps today's behaviour throughrefreshOptions<Name>().The init it was waiting out also got shorter.
ensureFilteredCurrentresolved each stored off-filter key with its own awaited single-row GET, so a MULTISELECT holding a few hundred keys cost that many serial round trips before the page could continue. They now go out together throughPromise.all, with the per-key error handling kept.Both page templates carry the shape, so both change:
form-page.js.templateanddocument-page.js.template.