Skip to content

A depends-on picker no longer offers the unnarrowed list while the page loads - #7675

Merged
delchev merged 1 commit into
eclipse-dirigible:masterfrom
nedelcho-delchev-tues:issue-7669-dependson-filter-before-options
Oct 5, 2026
Merged

delchev merged 1 commit into
eclipse-dirigible:masterfrom
nedelcho-delchev-tues:issue-7669-dependson-filter-before-options

Conversation

@nedelcho-delchev-tues

Copy link
Copy Markdown
Contributor

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 new refreshOptions<Name>() instead — narrowed while the trigger holds a value, whole while it does not. init() passes deferDependsOn, 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 through refreshOptions<Name>().

The init it was waiting out also got shorter. ensureFilteredCurrent resolved 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 through Promise.all, with the per-key error handling kept.

Both page templates carry the shape, so both change: form-page.js.template and document-page.js.template.

…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>
@delchev
delchev merged commit b25eee0 into eclipse-dirigible:master Oct 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

harmonia forms: a dependsOn picker offers the unfiltered list until a slow init finishes (per-row GET burst) - foreign options pickable for seconds

2 participants