2.0.0-alpha.3 • Published 10 days ago

@eitje/form-fields-web v2.0.0-alpha.3

Weekly downloads
282
License
ISC
Repository
github
Last release
10 days ago

Great fields, to be used together with eitje-app/forms

General props

These props are shared by every field

KeyExplanationDefault value
fieldname of the field in formData, will also be used for validations
nameMore granular control: validation will first look for the name prop before looking for the field prop. This way you can have different validations for the same field in different places
requiredis this field required for submitting?false
validateCustom validation function with (formData, field) as arguments
validateMessageCustom validation message
disableddisabled can be a bool or a function that takes formData as first argument
labellabel to be rendered alongside the field. This can be either a string, React node or a function. In case of a function, all element props will be passed to the labelp tag with name OR field.
labelStylestyle to be applied to the default label (NOTE: does only work if you pass nothing or a string){}
labelVisiblehides the label when truefalse
stylestyle to be applied to the form element{}
namespacenamespace to put its serialized data into (useful for creating nested data structures)
containerStylestyle object to be applied to the container{}
containerPropsprops object to be applied to the container{}
Containeroverride container component altogetherdiv
disabledStylestyle to be applied to the container when the field is disabled{opacity: 0.2}
readOnlydisables the input but does not apply disabled stylingfalse
submitStrategythe strategy to submit this field, can either be blur, change or inlineButton (spawns a button next to the input for user confirmation). If left open field can only be submitted through the form. NOTE: submitStrategy only submits the field being changednull

Input

Simple text input

KeyExplanationDefault value
secureif true renders a secure password inputfalse

Dropdown picker

Renders an antd dropdown picker

KeyExplanationDefault value
itemsarray of objects to be selected from[]
valueFieldThe property that you want to use as valueid
labelFieldThe property that you want to use as labelfalse
noSortDo not sort alphabeticallyfalse
modifyItemsmap function ran after dropdown picker converts the items into pickerItems, useful for adding an irregular option
showSearchallow users to search this pickerfalse
multipleis multiple selection allowed?false
innerClassclassName for the inner antd element

Date picker

KeyExplanationDefault value
innerClassclassName for the inner antd elemtn

Switch

No extra props

2.0.0-alpha.3

10 days ago

2.0.0-alpha.2

10 days ago

2.0.0-alpha.1

2 months ago

2.0.0-alpha

2 months ago

1.0.72

9 months ago

1.0.71

9 months ago

1.0.70

10 months ago

1.0.66

1 year ago

1.0.65

1 year ago

1.0.64

1 year ago

1.0.69

12 months ago

1.0.68

1 year ago

1.0.67

1 year ago

1.0.62

1 year ago

1.0.61

1 year ago

1.0.63

1 year ago

1.0.60

1 year ago

1.0.59

1 year ago

1.0.58

1 year ago

1.0.57

2 years ago

1.0.55

2 years ago

1.0.54

2 years ago

1.0.53

2 years ago

1.0.56

2 years ago

1.0.48

2 years ago

1.0.49

2 years ago

1.0.51

2 years ago

1.0.50

2 years ago

1.0.52

2 years ago

1.0.47

2 years ago

1.0.46

2 years ago

1.0.44

2 years ago

1.0.45

2 years ago

1.0.39

2 years ago

1.0.38

2 years ago

1.0.40

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.26

3 years ago

1.0.27

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.0

4 years ago