Auto-generated admin panel for node.js with react BaseRecord

Class

BaseRecord(params, resource)

Representation of an particular ORM/ODM Record in given Resource in AdminJS

Classes

BaseRecord

Members

Methods

# get(propertyPathopt, optionsopt) → {any}

Returns unflatten (regular) value for given field. So if you have in the params following

structure:

params = {
  genre.0: 'male',
  genre.1: 'female',
}

for get('genre') function will return ['male', 'female']

Parameters:
Name Type Attributes Description
propertyPath string <optional>

path for the property. If not set function returns an entire unflatten object

options GetOptions <optional>

View Source adminjs/src/backend/adapters/record/base-record.ts, line 348

unflatten data under given path

any

# set(propertyPath, value)

Sets given value under the propertyPath. Value is flatten and all previous values under this

path are replaced. When value is undefined function just clears the old values

Parameters:
Name Type Description
propertyPath string
value any

View Source adminjs/src/backend/adapters/record/base-record.ts, line 359

an entire, updated, params object