-
Notifications
You must be signed in to change notification settings - Fork 14
/
edit-contact.js
50 lines (49 loc) · 1.01 KB
/
edit-contact.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const editContact = {
name: 'app.EditContact',
component: 'RecordEditor',
baseForm: {
component: 'Form',
fields: [
{
name: 'firstName',
component: 'TextField',
label: 'First Name',
required: true,
block: false,
},
{
name: 'lastName',
component: 'TextField',
label: 'Last Name',
},
{
name: 'email',
component: 'EmailField',
label: 'Email',
},
],
listeners: [
{
event: 'load',
actions: [
{
// Default the id to '1' so that we can edit the doc later. Usually, this id would come
// from the route or the user's session
component: 'Set',
name: 'fields.id.value',
value: '1',
},
],
},
],
},
label: 'Contact',
store: {
component: 'LocalStorageStore',
storeName: 'contactLocalStorage',
},
storeWhere: {
id: '1',
},
};
export default editContact;