Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Prevent initial view.render when model.fetch is true #387

Open
yamsellem opened this issue Oct 1, 2014 · 1 comment
Open

Prevent initial view.render when model.fetch is true #387

yamsellem opened this issue Oct 1, 2014 · 1 comment
Milestone

Comments

@yamsellem
Copy link

A glitch appears every time a view uses the loading helper.
— The view is rendered a first time.
— Then, the model is fetched and the view's loading attribute changes, so the the view is rendered a second time (showing/hiding things depending on the loading helper).
— Then, the fetch succeed or failed, so the view is rendered a third time.

The first render seems wrong to me. If a view has to fetch something, it should be hidden until the fetch has begin, right?

@yamsellem yamsellem changed the title Prevent view.render when model.fetch is true Prevent initial view.render when model.fetch is true Oct 1, 2014
@kpdecker kpdecker added this to the 3.0 milestone Nov 30, 2014
@kpdecker
Copy link
Contributor

kpdecker commented Jan 7, 2015

What is causing the first render here? A jsfiddle/jsbin would help debug this a bit. Generally we try to defer rendering of views as long as possible, so I suspect that the first operation is related to an insert or similar.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants