Merge branch 'master' into master

This commit is contained in:
Ben Grynhaus 2019-01-27 10:39:35 +02:00 коммит произвёл GitHub
Родитель 4cf5b22201 6a3b75bf16
Коммит a4eb9c1046
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 19 добавлений и 4 удалений

11
.github/stale.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,11 @@
daysUntilStale: 60
daysUntilClose: 7
exemptLabels:
- pinned
- security
staleLabel: stale
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
closeComment: false

Просмотреть файл

@ -62,7 +62,9 @@ export class ReactTemplate<TContext extends object | void> extends React.Compone
componentDidUpdate() {
// Context has changes, trigger change detection after pushing the new context in
Object.assign(this._embeddedViewRef.context, this.props.context);
if (this.props.context != null && this._embeddedViewRef.context != null) {
Object.assign(this._embeddedViewRef.context, this.props.context);
}
this._embeddedViewRef.detectChanges();
}
@ -86,9 +88,11 @@ export class ReactTemplate<TContext extends object | void> extends React.Compone
// Throttling the detect changes to an empirically selected value so we don't overload too much work.
// TODO: This needs some better solution to listen to changes to the binding sources of the template.
this._ngZoneSubscription = ngZone.onStable.pipe(throttleTime(TEMPLATE_DETECT_CHANGES_THROTTLE_MS)).subscribe(() => {
this._embeddedViewRef.detectChanges();
});
this._ngZoneSubscription = ngZone.onStable
.pipe(throttleTime(TEMPLATE_DETECT_CHANGES_THROTTLE_MS, undefined, { leading: true, trailing: true }))
.subscribe(() => {
this._embeddedViewRef.detectChanges();
});
}
componentWillUnmount() {