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

Added child memoization to Repeater and fixed initialization bug #653

Merged
merged 15 commits into from
Jan 22, 2019

Conversation

exyi
Copy link
Member

@exyi exyi commented Oct 27, 2018

The controls are rendered twice on postback - OnLoad to find the command
and OnPreRender to give controls chance to render anything they need.
With this patch, the repeater will not reinitialize the controls that
were already initialized in Load and their DataContext was not changed.

EDIT: I did not mention what was the bugfix about:

The problem was, that on GET request in client-side rendering the server-side control tree was only initialized in Load. So when you had control that depended on being server-side initialized, your dataset was loaded in PreRender and Repeater was in Client rendering, your control was only initialized as client-side template which caused unexpected behavior.

The controls are rendered twice on postback - OnLoad to find the command
and OnPreRender to give controls chance to render anything they need.
With this patch, the repeater will not reinitialize the controls that
were already initialized in Load and their DataContext was not changed.
@exyi exyi requested a review from tomasherceg October 27, 2018 20:06
@quigamdev quigamdev merged commit f712c7e into master Jan 22, 2019
@quigamdev quigamdev deleted the repeater-memoization branch September 18, 2019 15:02
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.

None yet

3 participants