File

projects/ngx-property-grid/src/lib/property-value.ts

Index

Properties
Accessors

Constructor

constructor(o: any, meta: PropertyItemMeta)
Parameters :
Name Type Optional
o any No
meta PropertyItemMeta No

Properties

Public meta
Type : PropertyItemMeta

Accessors

value
getvalue()
setvalue(val: any)
Parameters :
Name Type Optional
val any No
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) {
  }
}

result-matching ""

    No results matching ""