Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with delayed-loaded view on a repeater #2

Open
ken107 opened this issue Jul 8, 2021 · 1 comment
Open

Issue with delayed-loaded view on a repeater #2

ken107 opened this issue Jul 8, 2021 · 1 comment

Comments

@ken107
Copy link
Owner

ken107 commented Jul 8, 2021

<div bind-repeater-if="#item ? 1 : 0" bind-view="Item">

If the view is ready at the time of binding, then no problem. However if it is not ready, we automatically create a boolean repeater in-place to represent its delayed loading state. This results in coincident repeaters.

We currently cannot handle coincident repeaters. Each repeater needs an anchor against which to attach the spawned elements. The second repeater wrongly uses the first repeater's ephemeral container as anchor.

@ken107
Copy link
Owner Author

ken107 commented Jul 9, 2021

We want to allow dynamic view loading, this means readiness of a view at the time of binding is unpredictable. If bind-repeater and bind-view are allowed on the same element, coincident-repeater errors will happen unpredictably. Thus, we must either disallow bind-repeater and bind-view on the same element, or make coincident repeaters work.

Coincident repeaters, i.e. two or more bind-repeater directives on the same element, generally do not make sense. The repeaters should instead be nested, like TDs inside TRs, for proper multidimensional structuring. The solution thus could simply be to convert coincident repeaters to nested repeaters automatically.

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

No branches or pull requests

1 participant