Refactor views to support dynamic updates.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { ViewContext } from 'view';
|
||||
import { View } from '../../../view/view';
|
||||
import { ViewModifier } from '../types';
|
||||
|
||||
export class RemoveContextPropertyViewModifier implements ViewModifier {
|
||||
protected _key: keyof ViewContext;
|
||||
protected _property: PropertyKey;
|
||||
|
||||
constructor(key: keyof ViewContext, property: PropertyKey) {
|
||||
this._key = key;
|
||||
this._property = property;
|
||||
}
|
||||
|
||||
public modify(view: View): void {
|
||||
view.removeContextProperty(this._key, this._property);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user