New: Headless Commerce with Remix! read more

ObjectTreeComponent

ObjectTreeComponent

This component displays a plain JavaScript object as an expandable tree.

Example

<vdr-object-tree [value]="payment.metadata"></vdr-object-tree>

Signature

class ObjectTreeComponent implements OnChanges {
  @Input() value: { [key: string]: any } | string;
  @Input() isArrayItem = false;
  depth: number;
  expanded: boolean;
  valueIsArray: boolean;
  entries: Array<{ key: string; value: any }>;
  constructor(parent: ObjectTreeComponent)
  ngOnChanges() => ;
  isObject(value: any) => boolean;
}

Implements

  • OnChanges

Members

value

property
type:
{ [key: string]: any } | string

isArrayItem

property
type:

depth

property
type:
number

expanded

property
type:
boolean

valueIsArray

property
type:
boolean

entries

property
type:
Array<{ key: string; value: any }>

constructor

method
type:
(parent: ObjectTreeComponent) => ObjectTreeComponent

ngOnChanges

method
type:
() =>

isObject

method
type:
(value: any) => boolean