You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/config/js_kanban_cards_config.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ cards?: [
29
29
coverURL?: string,
30
30
name?: string,
31
31
isCover?: boolean
32
+
size?: number
32
33
}, {...}
33
34
],
34
35
color?: string,
@@ -69,16 +70,17 @@ For each card you can specify the following parameters (data):
69
70
- `coverURL` - (optional) a path to the image to be set as a cover
70
71
- `name` - (optional) a file name
71
72
- `isCover` - (optional) enables a cover image. If **true**, the cover image will be downloaded via the "coverURL" url
73
+
- `size` - (optional) a size of the attached file (in bytes)
72
74
-`color` - (optional) a valid HEX color code. It is the color of the card top line
73
-
-`users` - (optional) an **array** with **ID**s for multiple assigned users or **string | number** for a single assigned user. To specify the assigned users, you need to define an array with users data in the [cardShape.users](../js_kanban_cardshape_config) property. The users are displayed in the **Users** field
75
+
-`users` - (optional) an **array** with **ID**s for multiple assigned users or **string | number** for a single assigned user. To specify the assigned users, you need to define an array with users data in the [cardShape.users](api/config/js_kanban_cardshape_config.md) property. The users are displayed in the **Users** field
74
76
75
77
:::info
76
-
`users?: array` - specify **array** with users **ID**s, if you use the [**multiselect**](../js_kanban_editorshape_config/#--parameters-for-combo-select-and-multiselect-types) editor type to assign multiple users
78
+
`users?: array` - specify **array** with users **ID**s, if you use the [**multiselect**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) editor type to assign multiple users
77
79
78
-
`users?: string | number` - specify a single **ID**, if you use the [**combo** or **select**](../js_kanban_editorshape_config/#--parameters-for-combo-select-and-multiselect-types) editor types to assign a single user
80
+
`users?: string | number` - specify a single **ID**, if you use the [**combo** or **select**](api/config/js_kanban_editorshape_config.md#--parameters-for-combo-select-and-multiselect-types) editor types to assign a single user
79
81
:::
80
82
81
-
-`priority` - (optional) a card priority **ID**. To specify the card priority, you need to define an array with priorities data in the [cardShape.priority](../js_kanban_cardshape_config) property. It is displayed in the **Priority** field
83
+
-`priority` - (optional) a card priority **ID**. To specify the card priority, you need to define an array with priorities data in the [cardShape.priority](api/config/js_kanban_cardshape_config.md) property. It is displayed in the **Priority** field
82
84
-`css` - (optional) defines css styles for a separate card
83
85
-`votes` - (optional) an array of user IDs
84
86
-`comments` - (optional) an array of objects with data of comments. For each comment's object you can specify the following parameters:
@@ -87,15 +89,15 @@ For each card you can specify the following parameters (data):
87
89
-`cardId` - (required) an **ID** of the card that the comment belongs to
88
90
-`text` - (optional) a text of the comment. It also can contain html markup
89
91
-`date` - (optional) a Date object (do not specify a string date). The date when the comment was posted. It is not updated after editing
90
-
-`custom_key` - (optional) a custom key of the card. You can specify the custom keys to place the card into column and row. See the [columnKey](../js_kanban_columnkey_config) and [rowKey](../js_kanban_rowkey_config) properties
92
+
-`custom_key` - (optional) a custom key of the card. You can specify the custom keys to place the card into column and row. See the [columnKey](../js_kanban_columnkey_config) and [rowKey](api/config/js_kanban_rowkey_config.md) properties
91
93
92
94
:::info
93
-
If you want to load new data for cards dynamically, you can use the [**parse()**](../../methods/js_kanban_parse_method) method!
95
+
If you want to load new data for cards dynamically, you can use the [**parse()**](api/methods/js_kanban_parse_method.md) method!
94
96
:::
95
97
96
98
### Example
97
99
98
-
~~~jsx {1-40,44}
100
+
~~~jsx {1-41,45}
99
101
constcards= [
100
102
{
101
103
id:1,
@@ -111,7 +113,8 @@ const cards = [
111
113
previewURL:"../assets/img-1.jpg",
112
114
coverURL:"../assets/img-1.jpg",
113
115
name:"img-1.jpg",
114
-
isCover:true
116
+
isCover:true,
117
+
size:11979
115
118
}, {...} // other attached files data
116
119
],
117
120
color:"#65D3B3",
@@ -147,7 +150,7 @@ new kanban.Kanban("#root", {
147
150
**Change log:** The ***css***, ***comments*** and ***votes*** parameters were added in v1.4
148
151
149
152
**Related articles:**
150
-
-[Working with data](../../../guides/working_with_data)
@@ -190,7 +204,7 @@ To configure the card appearance, in the **cardShape** object you can specify th
190
204
-`clickable`- (optional) - makes the vote icon on the card clickable. If`true`, users can vote for the card using the vote icon on thiscard. Otherwise, users can vote for the card using the vote icon in the editor only
191
205
-`css`- a function returns a css class that applies to cards conditionally
192
206
- `headerFields` - (optional) an array of objects with the **custom fields** data. Here you can specify the following parameters:
193
-
- `key` - (required) a key of the custom field. It is used when configuring the Editor via the [editorShape](../js_kanban_editorshape_config) property
207
+
- `key` - (required) a key of the custom field. It is used when configuring the Editor via the [editorShape](api/config/js_kanban_editorshape_config.md) property
194
208
- `label` - (optional) a label of the custom field
195
209
- `css` - (optional) a css class of the custom field
0 commit comments