@performant-software/user-defined-fields

2.2.4 • Public • Published

UserDefinedFields

This package is designed to be used with the user_defined_fields Rails gem. The idea is to allow users to define what type of metadata they want to collection about specific models and use these components to add, remove, and modify the configuration of the fields.

Installation

yarn add @performant-software/user-defined-fields

or

npm install @performant-software/user-defined-fields

Components

To load user defined fields directly from the API endpoint, use the UserDefinedFieldsList component.

<UserDefinedFieldsList />

To add the user defined fields from nested attributes of a parent record, use the UserDefinedFieldsEmbeddedList component.

<UserDefinedFieldsEmbeddedList
  items={props.item.user_defined_fields}
  onDelete={props.onDeleteChildAssociation.bind(this, 'user_defined_fields')}
  onSave={props.onSaveChildAssociation.bind(this, 'user_defined_fields')}
/>

Services

// Fetch the list of user defined fields
UserDefinedFieldsService.fetchAll(params)

// Fetch a single user defined field
UserDefinedFieldsService.fetchOne(id)

// Save a user defined field
UserDefinedFieldsService.save(udf)

// Delete a user defined field
UserDefinedFieldsService.delete(udf)

// Fetch a list of tables to which user defined fields can be added
UserDefinedFieldsService.fetchTables()

// Fetch a list of allowed data types
UserDefinedFieldsService.fetchDataTypes()

Readme

Keywords

none

Package Sidebar

Install

npm i @performant-software/user-defined-fields

Weekly Downloads

32

Version

2.2.4

License

MIT

Unpacked Size

3.74 MB

Total Files

2181

Last publish

Collaborators

  • ajolipa
  • lwjameson
  • cyclosa
  • dleadbetter
  • jamiefolsom
  • nicklaiacona
  • jamie-performant