projects/ngx-property-grid/src/lib/property-value.ts
Properties |
|
Accessors |
constructor(o: any, meta: PropertyItemMeta)
|
|||||||||
|
Parameters :
|
| Public meta |
Type : PropertyItemMeta
|
| value | ||||||
getvalue()
|
||||||
setvalue(val: any)
|
||||||
|
Parameters :
Returns :
void
|
| options |
getoptions()
|
import {PropertyItemMeta} from './property-item-meta';
export class PropertyValue {
public get value(): any {
return this.o[this.meta.key];
}
public set value(val: any) {
const oldValue = this.o[this.meta.key];
const newValue = this.meta.valueConvert ? this.meta.valueConvert(val) : val;
this.o[this.meta.key] = newValue;
if (this.meta.valueChanged) {
this.meta.valueChanged(newValue, oldValue);
}
}
public get options(): any {
return this.meta.options;
}
constructor(private o: any, public meta: PropertyItemMeta) {
}
}