0.3.1 • Published 6 years ago

@methodexists/me-schema-form v0.3.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

me-schema-form

Pack of components to represent data provided by me-core.

Usage

Describe usage.

Examples

Provide examples.

API

<Field /> props

PropTypeDefaultDescription
isEnumboolfalseIf field’s schema has enum property then Field will use Select component with enum values as options
getValuefuncundefinedAllows to use custom value getter. Accepts record, pathPrefix, path.
***TODO: describe the rest of the props

Field components

RichEditor

<Field path="..." component="richEditor" />

Will use me-rich-editor to render the field.
You may provide me-rich-editor props into <Field />:

<Field path="bio" component="richEditor" onImageUpload={handleImageUpload} />

<SchemaForm /> props

PropTypeDefaultDescription
showSpinnerWhenLoadingbooltrueSet this to false to turn off spinner on form. It’s usefult when you have a spinner on parent component
***TODO: describe the rest of the props

<AddItemModal /> props

PropTypeDefaultDescription
*namespacestring
*tablestring
primaryKeystring'id'
defaultValuesobject{}To prefill the record
addItemTitlestringundefinedText to show in button and modal titles. If undefined then 'App.generic.new' message from locales is used.
addItemButtonPropsobjectundefinedOverride any prop in add button
onSubmitfuncundefinedCalled after succesful result from the server. Provides server response as an argument

<FormFooter /> props

PropTypeDefaultDescription
saveButtonPropsobjectundefinedOverride any prop in save button
onSubmitfuncundefinedCalled after succesful result from the server. Provides server response as an argument
***TODO: describe the rest of the props

<Multiple /> props

PropTypeDefaultDescription
getNewItemfuncundefinedRecevies record and path and should return item to add into array. If undefined {} will be added
***TODO: describe the rest of the props

<MultipleTable /> props

PropTypeDefaultDescription
tableTitlestringundefinedSet to override table title which will be read from schema by default
getNewItemfuncundefinedRecevies record and path and should return item to add into array. If undefined {} will be added
tablePropsobjectundefinedProps to pass into underlying Ant Table component
***TODO: describe the rest of the props

<ReferenceSelect /> props

PropTypeDefaultDescription
filterByFieldstring'name'The value of that field of option will be used for filter
***TODO: describe the rest of the props

Contributing

See CONTRIBUTING.md for how to develop a component.

0.3.1

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.25

7 years ago

0.1.24

7 years ago

0.1.23

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.3

7 years ago

0.1.0

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago