@lowdefy/docs-content 6.0.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/README.md +1 -0
  2. package/content/actions/downloadcsv.md +1 -1
  3. package/content/actions/emailotpsend.md +58 -0
  4. package/content/actions/emailotpverify.md +79 -0
  5. package/content/actions/getlocalstorage.md +43 -0
  6. package/content/actions/link.md +47 -1
  7. package/content/actions/login.md +25 -5
  8. package/content/actions/logout.md +7 -5
  9. package/content/actions/magiclinkverify.md +117 -0
  10. package/content/actions/pdfmake.md +2 -2
  11. package/content/actions/posthogalias.md +29 -0
  12. package/content/actions/posthogcapture.md +49 -0
  13. package/content/actions/posthogcapturepageleave.md +38 -0
  14. package/content/actions/posthogfeatureflag.md +50 -0
  15. package/content/actions/posthoggroup.md +37 -0
  16. package/content/actions/posthogidentify.md +54 -0
  17. package/content/actions/posthoginit.md +96 -0
  18. package/content/actions/posthogoptin.md +29 -0
  19. package/content/actions/posthogoptout.md +29 -0
  20. package/content/actions/posthogpageview.md +37 -0
  21. package/content/actions/posthogreloadfeatureflags.md +47 -0
  22. package/content/actions/posthogreset.md +28 -0
  23. package/content/actions/posthogsetpersonproperties.md +36 -0
  24. package/content/actions/removelocalstorage.md +28 -0
  25. package/content/actions/resetvalidation.md +5 -3
  26. package/content/actions/setdarkmode.md +3 -3
  27. package/content/actions/setglobal.md +2 -0
  28. package/content/actions/setlocale.md +1 -1
  29. package/content/actions/setlocalstorage.md +34 -0
  30. package/content/actions/setstate.md +2 -0
  31. package/content/actions/validate.md +7 -4
  32. package/content/adapter-reference/mongodbauthadapter.md +46 -0
  33. package/content/agents/agent-endpoint-tools.md +24 -0
  34. package/content/agents/agent-properties.md +13 -3
  35. package/content/agents/agent-server-hooks.md +1 -1
  36. package/content/agents/agentchat.md +41 -4
  37. package/content/agents/agentconversations.md +42 -8
  38. package/content/agents/agents-introduction.md +107 -0
  39. package/content/callback-reference/auth0logoutcallback.md +54 -0
  40. package/content/concepts/ai-agent-docs.md +455 -106
  41. package/content/concepts/blocks.md +150 -0
  42. package/content/concepts/connections-and-requests.md +402 -0
  43. package/content/concepts/custom-html.md +42 -0
  44. package/content/concepts/custom-styling.md +50 -5
  45. package/content/concepts/dynamic-page-content.md +309 -0
  46. package/content/concepts/events-and-actions.md +185 -2
  47. package/content/concepts/four-primitives.md +31 -0
  48. package/content/concepts/html-attributes.md +293 -0
  49. package/content/concepts/i18n.md +12 -3
  50. package/content/concepts/keyboard-shortcuts.md +2 -2
  51. package/content/concepts/layout-overview.md +1 -1
  52. package/content/concepts/logger.md +99 -0
  53. package/content/concepts/lowdefy-api.md +1319 -0
  54. package/content/concepts/lowdefy-schema.md +144 -3
  55. package/content/concepts/menus.md +8 -7
  56. package/content/concepts/module-authoring.md +76 -5
  57. package/content/concepts/modules.md +3 -1
  58. package/content/concepts/notifications.md +180 -0
  59. package/content/concepts/operators.md +7 -0
  60. package/content/concepts/page-and-app-state.md +252 -0
  61. package/content/concepts/page-paths.md +209 -0
  62. package/content/concepts/theming.md +582 -0
  63. package/content/connections/aigateway.md +375 -0
  64. package/content/connections/anthropic.md +169 -2
  65. package/content/connections/awss3.md +178 -2
  66. package/content/connections/axioshttp.md +181 -0
  67. package/content/connections/google.md +169 -2
  68. package/content/connections/mongodb.md +1014 -3
  69. package/content/connections/openai-connection.md +169 -2
  70. package/content/connections/sendgridmail.md +3 -0
  71. package/content/connections/smtp.md +16 -0
  72. package/content/connections/treg.md +329 -0
  73. package/content/container-blocks/affix.md +47 -7
  74. package/content/container-blocks/alert.md +76 -24
  75. package/content/container-blocks/badge.md +100 -24
  76. package/content/container-blocks/box.md +9 -9
  77. package/content/container-blocks/card.md +132 -27
  78. package/content/container-blocks/carousel.md +60 -7
  79. package/content/container-blocks/collapse.md +153 -9
  80. package/content/container-blocks/configprovider.md +35 -13
  81. package/content/container-blocks/confirmmodal.md +69 -23
  82. package/content/container-blocks/content.md +62 -98
  83. package/content/container-blocks/descriptions.md +45 -4
  84. package/content/container-blocks/drawer.md +139 -28
  85. package/content/container-blocks/dropdownmenu.md +119 -31
  86. package/content/container-blocks/flex.md +40 -62
  87. package/content/container-blocks/footer.md +15 -11
  88. package/content/container-blocks/googlemapsheatmap.md +1 -1
  89. package/content/container-blocks/googlemapsscript.md +2 -2
  90. package/content/container-blocks/header.md +71 -36
  91. package/content/container-blocks/label.md +34 -7
  92. package/content/container-blocks/layout.md +52 -34
  93. package/content/container-blocks/masonry.md +17 -71
  94. package/content/container-blocks/mobilemenu.md +131 -88
  95. package/content/container-blocks/modal.md +161 -26
  96. package/content/container-blocks/pageheadermenu.md +138 -31
  97. package/content/container-blocks/pagesidebarlayout.md +230 -27
  98. package/content/container-blocks/pagesidermenu.md +153 -43
  99. package/content/container-blocks/popover.md +34 -31
  100. package/content/container-blocks/result.md +32 -21
  101. package/content/container-blocks/sider.md +85 -122
  102. package/content/container-blocks/span.md +7 -7
  103. package/content/container-blocks/spinner.md +3 -3
  104. package/content/container-blocks/splitter.md +150 -68
  105. package/content/container-blocks/tabs.md +64 -12
  106. package/content/container-blocks/tooltip.md +22 -46
  107. package/content/container-blocks/watermark.md +22 -4
  108. package/content/controls/parallel_for.md +21 -2
  109. package/content/controls/reject.md +26 -3
  110. package/content/controls/return.md +17 -1
  111. package/content/controls/throw.md +30 -2
  112. package/content/controls/try.md +24 -2
  113. package/content/controls/while.md +46 -0
  114. package/content/deployment/deployment-environments.md +146 -0
  115. package/content/deployment/docker.md +23 -7
  116. package/content/deployment/node-server.md +4 -0
  117. package/content/deployment/vercel.md +25 -19
  118. package/content/display-blocks/aggrid.md +33 -16
  119. package/content/display-blocks/anchor.md +16 -15
  120. package/content/display-blocks/avatar.md +57 -37
  121. package/content/display-blocks/breadcrumb.md +70 -21
  122. package/content/display-blocks/button.md +93 -19
  123. package/content/display-blocks/calendar.md +12 -0
  124. package/content/display-blocks/clickablehtml.md +239 -0
  125. package/content/display-blocks/dangeroushtml.md +1 -1
  126. package/content/display-blocks/difflist.md +1 -1
  127. package/content/display-blocks/difftimeline.md +1 -1
  128. package/content/display-blocks/divider.md +64 -3
  129. package/content/display-blocks/dropdownbutton.md +81 -30
  130. package/content/display-blocks/echart.md +35 -1
  131. package/content/display-blocks/eventlog.md +363 -0
  132. package/content/display-blocks/floatbutton.md +129 -42
  133. package/content/display-blocks/html.md +61 -1
  134. package/content/display-blocks/icon.md +250 -67
  135. package/content/display-blocks/img.md +2 -2
  136. package/content/display-blocks/menu.md +146 -73
  137. package/content/display-blocks/message.md +38 -124
  138. package/content/display-blocks/notification.md +94 -222
  139. package/content/display-blocks/paragraph.md +59 -9
  140. package/content/display-blocks/pollingtimer.md +263 -0
  141. package/content/display-blocks/progress.md +96 -17
  142. package/content/display-blocks/qrcode.md +19 -4
  143. package/content/display-blocks/s3download.md +1 -1
  144. package/content/display-blocks/search.md +19 -9
  145. package/content/display-blocks/skeletonbutton.md +1 -0
  146. package/content/display-blocks/skeletoninput.md +1 -0
  147. package/content/display-blocks/statistic.md +75 -17
  148. package/content/display-blocks/steps.md +58 -25
  149. package/content/display-blocks/table.md +2527 -0
  150. package/content/display-blocks/tablelight.md +621 -0
  151. package/content/display-blocks/tag.md +102 -17
  152. package/content/display-blocks/title.md +50 -11
  153. package/content/display-blocks/tour.md +33 -23
  154. package/content/input-blocks/autocomplete.md +81 -9
  155. package/content/input-blocks/buttonselector.md +45 -8
  156. package/content/input-blocks/captcha.md +40 -0
  157. package/content/input-blocks/checkboxselector.md +97 -7
  158. package/content/input-blocks/checkboxswitch.md +33 -3
  159. package/content/input-blocks/colorselector.md +63 -14
  160. package/content/input-blocks/daterangeselector.md +165 -45
  161. package/content/input-blocks/dateselector.md +139 -41
  162. package/content/input-blocks/datetimeselector.md +158 -49
  163. package/content/input-blocks/inputgallery.md +3 -3
  164. package/content/input-blocks/intentinput.md +207 -0
  165. package/content/input-blocks/monthselector.md +120 -52
  166. package/content/input-blocks/multipleselector.md +150 -39
  167. package/content/input-blocks/numberinput.md +98 -12
  168. package/content/input-blocks/pagination.md +70 -14
  169. package/content/input-blocks/paragraphinput.md +51 -37
  170. package/content/input-blocks/passwordinput.md +60 -6
  171. package/content/input-blocks/phonenumberinput.md +59 -26
  172. package/content/input-blocks/placesautocomplete.md +319 -0
  173. package/content/input-blocks/radioselector.md +83 -7
  174. package/content/input-blocks/ratingslider.md +57 -26
  175. package/content/input-blocks/s3uploadbutton.md +24 -24
  176. package/content/input-blocks/s3uploaddragger.md +3 -3
  177. package/content/input-blocks/s3uploadphoto.md +5 -5
  178. package/content/input-blocks/segmentedselector.md +72 -32
  179. package/content/input-blocks/selector.md +109 -21
  180. package/content/input-blocks/switch.md +65 -17
  181. package/content/input-blocks/tableinput.md +445 -0
  182. package/content/input-blocks/tagmultipleselector.md +114 -0
  183. package/content/input-blocks/tagselector.md +114 -0
  184. package/content/input-blocks/textarea.md +32 -3
  185. package/content/input-blocks/textinput.md +70 -29
  186. package/content/input-blocks/tiptapinput.md +1 -1
  187. package/content/input-blocks/tiptapmentioninput.md +2 -2
  188. package/content/input-blocks/titleinput.md +39 -12
  189. package/content/input-blocks/treeinput.md +49 -25
  190. package/content/input-blocks/treemultipleselector.md +127 -10
  191. package/content/input-blocks/treeselector.md +97 -9
  192. package/content/input-blocks/upload.md +64 -15
  193. package/content/input-blocks/uploaddragger.md +17 -1
  194. package/content/input-blocks/uploadphoto.md +18 -1
  195. package/content/input-blocks/weekselector.md +120 -55
  196. package/content/learn/introduction.md +27 -0
  197. package/content/learn/quickstart.md +53 -0
  198. package/content/learn/showcase.md +8 -0
  199. package/content/list-blocks/controlledlist.md +24 -15
  200. package/content/list-blocks/list.md +11 -11
  201. package/content/list-blocks/masonrylist.md +7 -34
  202. package/content/migration/auth-upgrade.md +337 -0
  203. package/content/migration/upgrade-guide.md +1 -0
  204. package/content/migration/v3-to-v4.md +417 -0
  205. package/content/migration/v6-to-v7.md +620 -0
  206. package/content/operators/_agent.md +155 -0
  207. package/content/operators/_app.md +2 -1
  208. package/content/operators/_array.md +122 -1
  209. package/content/operators/_build.md +1 -0
  210. package/content/operators/_credential.md +57 -0
  211. package/content/operators/_cron.md +292 -0
  212. package/content/operators/_date.md +2 -0
  213. package/content/operators/_error.md +196 -0
  214. package/content/operators/_get.md +6 -6
  215. package/content/operators/_hmac.md +78 -0
  216. package/content/operators/_js.md +2 -1
  217. package/content/operators/_location.md +1 -1
  218. package/content/operators/_media.md +13 -0
  219. package/content/operators/_module.md +56 -2
  220. package/content/operators/_operator.md +17 -3
  221. package/content/operators/_path_params.md +82 -0
  222. package/content/operators/_ref.md +258 -0
  223. package/content/operators/_request.md +1 -1
  224. package/content/operators/_request_details.md +6 -0
  225. package/content/operators/_type.md +14 -3
  226. package/content/operators/_url_query.md +2 -0
  227. package/content/operators/_user.md +3 -3
  228. package/content/plugins/plugins-actions.md +10 -0
  229. package/content/plugins/plugins-connections.md +25 -0
  230. package/content/plugins/plugins-dev.md +66 -0
  231. package/content/plugins/plugins-icon-sets.md +267 -0
  232. package/content/plugins/plugins-introduction.md +27 -1
  233. package/content/plugins/plugins.md +19 -0
  234. package/content/plugins/posthog.md +359 -0
  235. package/content/provider-reference/auth-js-providers.md +107 -0
  236. package/content/provider-reference/openidconnectprovider.md +44 -0
  237. package/content/recipes/recipes.md +16 -0
  238. package/content/reference/actions-reference.md +31 -0
  239. package/content/reference/blocks-reference.md +35 -0
  240. package/content/reference/cli.md +403 -0
  241. package/content/reference/connections-reference.md +23 -0
  242. package/content/reference/operators-reference.md +47 -0
  243. package/content/reference/reference.md +16 -0
  244. package/content/reference/schema-reference.md +12 -0
  245. package/content/testing/config-tests.md +677 -0
  246. package/content/testing/e2e-configuration.md +31 -1
  247. package/content/testing/e2e-getting-started.md +1 -1
  248. package/content/testing/e2e-introduction.md +1 -1
  249. package/content/testing/e2e-writing-tests.md +12 -1
  250. package/content/testing/explore-pull-request.md +136 -0
  251. package/content/testing/journey-data-sets.md +326 -0
  252. package/content/tutorial/tutorial-actions-operators.md +2 -2
  253. package/content/tutorial/tutorial-add-blocks.md +2 -2
  254. package/content/tutorial/tutorial-create-page.md +48 -2
  255. package/content/tutorial/tutorial-display-data-page.md +3 -3
  256. package/content/tutorial/tutorial-requests-api.md +155 -0
  257. package/content/tutorial/tutorial-requests-sql.md +153 -0
  258. package/content/tutorial/tutorial-start.md +66 -1
  259. package/content/user-authentication/auth-configuration.md +267 -0
  260. package/content/user-authentication/auth-providers.md +24 -0
  261. package/content/user-authentication/auth-steps.md +141 -0
  262. package/content/user-authentication/login-and-logout.md +160 -8
  263. package/content/user-authentication/mcp-oauth.md +424 -0
  264. package/content/user-authentication/organizations.md +246 -0
  265. package/content/user-authentication/protected-pages-apis.md +97 -0
  266. package/content/user-authentication/roles.md +49 -0
  267. package/content/user-authentication/two-factor.md +229 -0
  268. package/content/user-authentication/user-object.md +58 -0
  269. package/content/user-authentication/users-introduction.md +8 -0
  270. package/content/websockets/websocket-publish.md +105 -0
  271. package/content/websockets/websocket-subscriptions.md +136 -0
  272. package/content/websockets/websockets-introduction.md +101 -0
  273. package/hazards.json +56 -0
  274. package/index.json +3472 -14
  275. package/package.json +10 -1
  276. package/scripts/extractAgentDocs.js +41 -30
  277. package/scripts/hashDocSources.js +38 -0
  278. package/scripts/isRedirectPage.js +26 -0
  279. package/scripts/recordSourceHashes.js +97 -0
  280. package/scripts/resolvePageSections.js +42 -0
  281. package/scripts/sectionKind.js +27 -0
  282. package/content/concepts/cli.md +0 -223
  283. package/content/other/introduction.md +0 -39
  284. package/content/other/next-auth-providers.md +0 -3
  285. /package/content/{other → actions}/updatesession.md +0 -0
@@ -25,6 +25,22 @@ Toggle switch with optional text and icon labels.
25
25
  disabled: true
26
26
  ```
27
27
 
28
+ ```yaml
29
+ - id: loading_switch
30
+ type: Switch
31
+ properties:
32
+ title: Saving
33
+ loading: true
34
+ label:
35
+ extra: Shows a spinner and ignores clicks, eg. while a request saves the value.
36
+ events:
37
+ onMount:
38
+ - id: set_default
39
+ type: SetState
40
+ params:
41
+ loading_switch: true
42
+ ```
43
+
28
44
  ```yaml
29
45
  - id: text_on_off
30
46
  type: Switch
@@ -74,25 +90,25 @@ Toggle switch with optional text and icon labels.
74
90
  type: Switch
75
91
  properties:
76
92
  title: Custom Checked Icon
77
- checkedIcon: AiOutlineLike
78
- uncheckedIcon: AiOutlineDislike
93
+ checkedIcon: ThumbsUp
94
+ uncheckedIcon: ThumbsDown
79
95
  label:
80
96
  disabled: true
81
97
  - id: icon_lock
82
98
  type: Switch
83
99
  properties:
84
100
  title: Lock / Unlock
85
- checkedIcon: AiOutlineLock
86
- uncheckedIcon: AiOutlineUnlock
101
+ checkedIcon: lock
102
+ uncheckedIcon: unlock
87
103
  label:
88
104
  disabled: true
89
105
  - id: icon_sound
90
106
  type: Switch
91
107
  properties:
92
108
  title: Sound On / Off
93
- checkedIcon: AiOutlineSound
109
+ checkedIcon: Volume2
94
110
  uncheckedIcon:
95
- name: AiOutlineStop
111
+ name: Ban
96
112
  color: "#999"
97
113
  label:
98
114
  disabled: true
@@ -100,16 +116,16 @@ Toggle switch with optional text and icon labels.
100
116
  type: Switch
101
117
  properties:
102
118
  title: Visibility Toggle
103
- checkedIcon: AiOutlineEye
104
- uncheckedIcon: AiOutlineEyeInvisible
119
+ checkedIcon: view
120
+ uncheckedIcon: hide
105
121
  label:
106
122
  disabled: true
107
123
  - id: icon_power
108
124
  type: Switch
109
125
  properties:
110
126
  title: Power Toggle
111
- checkedIcon: AiOutlineThunderbolt
112
- uncheckedIcon: AiOutlinePoweroff
127
+ checkedIcon: Zap
128
+ uncheckedIcon: Power
113
129
  label:
114
130
  disabled: true
115
131
  ```
@@ -220,8 +236,8 @@ Toggle switch with optional text and icon labels.
220
236
  properties:
221
237
  title: Disabled with Icons
222
238
  disabled: true
223
- checkedIcon: AiOutlineLike
224
- uncheckedIcon: AiOutlineDislike
239
+ checkedIcon: ThumbsUp
240
+ uncheckedIcon: ThumbsDown
225
241
  label:
226
242
  disabled: true
227
243
  ```
@@ -479,7 +495,7 @@ Toggle switch with optional text and icon labels.
479
495
  type: Button
480
496
  properties:
481
497
  title: Save Privacy Settings
482
- icon: AiOutlineSave
498
+ icon: save
483
499
  type: primary
484
500
  block: true
485
501
  events:
@@ -494,26 +510,58 @@ Toggle switch with optional text and icon labels.
494
510
  | Property | Type | Default | Description |
495
511
  | --- | --- | --- | --- |
496
512
  | `autoFocus` | boolean | `false` | Autofocus to the block on page load. |
497
- | `checkedIcon` | string \| object | `"AiOutlineCheck"` | Name of an React-Icon (See all icons) or properties of an Icon block to customize icon to shown when switch is checked (true). |
513
+ | `checkedIcon` | string \| object | `"check"` | Icon name (a semantic name like `edit`, a Lucide icon name like `Pencil`, or a set-qualified name like `tabler:Pencil`) or properties of an Icon block to customize icon to shown when switch is checked (true). |
514
+ | `checkedIcon.name` | string | - | Icon name: a semantic name like `edit`, a Lucide icon name like `Pencil`, or a set-qualified name like `tabler:Pencil`. |
515
+ | `checkedIcon.color` | string | - | Icon color. |
516
+ | `checkedIcon.size` | string \| number | - | Size of the icon. Defaults to `theme.icons.size`. |
517
+ | `checkedIcon.rotate` | number | - | Number of degrees to rotate the icon. |
518
+ | `checkedIcon.spin` | boolean | - | Continuously spin the icon with animation. |
519
+ | `checkedIcon.strokeWidth` | number | - | Stroke width of the icon lines, in pixels of the 24px icon grid. Defaults to `theme.icons.strokeWidth` (2). |
520
+ | `checkedIcon.nonScalingStroke` | boolean | - | Keep the stroke width constant at any icon size. Defaults to `theme.icons.nonScalingStroke`. |
521
+ | `checkedIcon.title` | string | - | Icon hover title for accessibility. An empty string marks the icon as decorative. |
522
+ | `checkedIcon.disableLoadingIcon` | boolean | - | While loading after the icon has been clicked, don't render the loading icon. |
498
523
  | `checkedText` | string | - | Text to shown when switch is checked (true). |
499
524
  | `color` | string | - | Switch checked color. |
500
525
  | `disabled` | boolean | `false` | Disable the block if true. |
501
526
  | `label` | object | - | Label properties. |
527
+ | `label.xs` | object | - | Label width on extra small screens (below 576px) when the label is not inline. |
528
+ | `label.xs.span` | number | - | Label width in columns, out of 24. The content takes the remaining columns. |
529
+ | `label.sm` | object | - | Label width on small screens (576px and up) when the label is not inline. Also applies below 576px unless `xs` is set. |
530
+ | `label.sm.span` | number | - | Label width in columns, out of 24. The content takes the remaining columns. |
531
+ | `label.md` | object | - | Label width on medium screens (768px and up) when the label is not inline. Overrides `span`. |
532
+ | `label.md.span` | number | - | Label width in columns, out of 24. The content takes the remaining columns. |
533
+ | `label.lg` | object | - | Label width on large screens (992px and up) when the label is not inline. |
534
+ | `label.lg.span` | number | - | Label width in columns, out of 24. The content takes the remaining columns. |
535
+ | `label.xl` | object | - | Label width on extra large screens (1200px and up) when the label is not inline. |
536
+ | `label.xl.span` | number | - | Label width in columns, out of 24. The content takes the remaining columns. |
537
+ | `label.xxl` | object | - | Label width on extra extra large screens (1600px and up) when the label is not inline. |
538
+ | `label.xxl.span` | number | - | Label width in columns, out of 24. The content takes the remaining columns. |
502
539
  | `label.align` | string | `"left"` | Align label left or right when inline. Enum: `left`, `right`. |
503
540
  | `label.colon` | boolean | `true` | Append label with colon. |
504
541
  | `label.extra` | string | - | Extra text to display beneath the content - supports html. |
505
542
  | `label.title` | string | - | Label title - supports html. |
506
543
  | `label.tooltip` | string \| object | - | Help tooltip shown via an icon beside the label. A string sets the tooltip text (supports html), or an object to also customize the icon and color. Use the block's onTooltipClick event to respond to clicks on the icon. |
507
544
  | `label.tooltip.title` | string | - | Tooltip text shown on hover - supports html. |
508
- | `label.tooltip.icon` | string | `"AiOutlineQuestionCircle"` | Name of the icon to show beside the label. |
545
+ | `label.tooltip.icon` | string | `"help"` | Icon name to show beside the label: a semantic name like `help`, a Lucide icon name like `CircleQuestionMark`, or a set-qualified name like `tabler:HelpCircle`. |
509
546
  | `label.tooltip.color` | string | - | Color of the tooltip icon. |
510
- | `label.span` | number | - | Label inline span. |
547
+ | `label.span` | number | - | Label width in columns, out of 24, on medium screens (768px) and up when the label is not inline. The content takes the remaining columns. |
511
548
  | `label.disabled` | boolean | `false` | Hide input label. |
512
549
  | `label.hasFeedback` | boolean | `true` | Display feedback extra from validation, this does not disable validation. |
513
550
  | `label.inline` | boolean | `false` | Render input and label inline. |
551
+ | `label.wrap` | boolean | `false` | Wrap long label text onto multiple lines when the label is inline. Labels above their input always wrap. |
552
+ | `loading` | boolean | `false` | Show a loading indicator in the switch handle and block changes, eg. while a request saves the new value. |
514
553
  | `size` | string | `"default"` | Size of the block. Enum: `small`, `default`. |
515
554
  | `title` | string | - | Title to describe the input component, if no title is specified the block id is displayed - supports html. |
516
- | `uncheckedIcon` | string \| object | `"AiOutlineClose"` | Name of an React-Icon (See all icons) or properties of an Icon block to customize icon to shown when switch is unchecked (false). |
555
+ | `uncheckedIcon` | string \| object | `"close"` | Icon name (a semantic name like `edit`, a Lucide icon name like `Pencil`, or a set-qualified name like `tabler:Pencil`) or properties of an Icon block to customize icon to shown when switch is unchecked (false). |
556
+ | `uncheckedIcon.name` | string | - | Icon name: a semantic name like `edit`, a Lucide icon name like `Pencil`, or a set-qualified name like `tabler:Pencil`. |
557
+ | `uncheckedIcon.color` | string | - | Icon color. |
558
+ | `uncheckedIcon.size` | string \| number | - | Size of the icon. Defaults to `theme.icons.size`. |
559
+ | `uncheckedIcon.rotate` | number | - | Number of degrees to rotate the icon. |
560
+ | `uncheckedIcon.spin` | boolean | - | Continuously spin the icon with animation. |
561
+ | `uncheckedIcon.strokeWidth` | number | - | Stroke width of the icon lines, in pixels of the 24px icon grid. Defaults to `theme.icons.strokeWidth` (2). |
562
+ | `uncheckedIcon.nonScalingStroke` | boolean | - | Keep the stroke width constant at any icon size. Defaults to `theme.icons.nonScalingStroke`. |
563
+ | `uncheckedIcon.title` | string | - | Icon hover title for accessibility. An empty string marks the icon as decorative. |
564
+ | `uncheckedIcon.disableLoadingIcon` | boolean | - | While loading after the icon has been clicked, don't render the loading icon. |
517
565
  | `uncheckedText` | string | - | Text to shown when switch is not checked (false). |
518
566
  | `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/overview#design-token). See [Ant Design switch tokens](https://ant.design/components/switch#design-token). |
519
567
  | `theme.trackHeight` | number | `22` | Height of the switch track. |
@@ -0,0 +1,445 @@
1
+ # TableInput
2
+
3
+ The Table for editing a list of rows in a form, such as the line items of an invoice or the ingredients of a recipe. Rows come from `data` and are never written: the block value is the changes made to them, `{ updated, added, removed, moved?, order? }`, which a `MongoDBTableChanges` request saves in one bulk write. It has every Table property, plus "+ Add row", row deletion, undo and redo, and paste from a spreadsheet.
4
+
5
+ ## When to use TableInput
6
+
7
+ `TableInput` is the [Table](/Table) for rows that belong to a form: the lines of an invoice, the ingredients of a recipe, the contacts on an account. The user edits, adds, deletes, reorders and pastes rows, and one request saves everything they changed.
8
+
9
+ Use `Table` instead when each edit should save at once (a CRM record list, where `onCellEdit` saves one cell), and `TableLight` when nothing is edited.
10
+
11
+ `TableInput` takes every `Table` property: columns and cell types, sorting, filters, search, grouping, selection, `rowLink`, row buttons and the rest work the same. It reads client `data` only (no server mode), and its view and selection are internal to the block rather than part of its value. Unlike `Table` it has no slots (no toolbar, bulk action or empty slot blocks): use `emptyText` for its empty state. Row events carry the row's `index` in `data`, and `null` for a row added in the table.
12
+
13
+ Of the [enrichment table](/TableGuide#enrichment-tables) features it takes formula columns (`kind: formula` with a `template`, computed in the browser) and its own "+ Add row" (`addRow`, into the changes). The rest runs cells on the server over stored rows, so it is `Table` only: `providers`, `addColumn`, `importCsv`, `inputFieldPrefix`, enrichment, ai, extract, `status` and user-defined columns, and the column and run events. `TableInput` refuses those keys with a message naming `Table`.
14
+
15
+ ## The value is the changes, not the rows
16
+
17
+ `data` is never written. The block value holds only what changed since `data`, keyed by row key:
18
+
19
+ ```yaml
20
+ updated: # changed fields of existing rows, keyed by the column field (a dot path)
21
+ flour:
22
+ qty: 450
23
+ details.note: strong
24
+ added: # new rows, each with a new temporary rowKey
25
+ - rowKey: 3f2c9a61-...
26
+ ingredient: Yeast
27
+ qty: 7
28
+ removed: # keys of deleted data rows
29
+ - salt
30
+ moved: # with rowDrag.positionField: the new positions of moved rows
31
+ water: 1536
32
+ order: [salt, flour, water] # with rowDrag and no positionField: every row key after a move
33
+ ```
34
+
35
+ - No changes is `{ updated: {}, added: [], removed: [] }`, the initial value.
36
+ - An edit back to the original value drops out of `updated`. Deleting an added row just removes it from `added`.
37
+ - The table shows `data` with the changes applied, and only touched rows re-render, so a long list keeps a small page state.
38
+ - `onChange` fires with `{ value, cause, rowKey, skipped }`: `cause` is `edit`, `add`, `delete`, `move`, `paste`, `undo` or `redo`, and `skipped` lists the pasted cells that could not be written.
39
+ - `SetState` on the block id sets the changes, and `resetChanges` clears them with the undo history.
40
+
41
+ Rows need a key: `rowKey` (default `_id`, then `id`). A row added in the table shows its temporary key in that field. A `default` on the key column is ignored, so added rows never share a key; the key the saved row gets comes back in the save response's `insertedKeys`.
42
+
43
+ ## Editing
44
+
45
+ Mark columns `editable: true`, or `editable: { when: <condition> }` to allow it per row. The editor comes from the type:
46
+
47
+ | Types | Editor |
48
+ | ------------------------------- | --------------------------- |
49
+ | `text`, `email`, `phone`, `url` | text input |
50
+ | `number`, `currency`, `percent` | number input |
51
+ | `date`, `datetime` | date picker |
52
+ | `boolean` | switch |
53
+ | `tag`, `status` | select from `options` |
54
+ | `tags` | multi-select from `options` |
55
+ | `rating` | stars |
56
+
57
+ Other types (`link`, `avatar`, `people`, `relation`, `html`, `json`, `image`, `progress`, `buttons`, `menu`) are never editable.
58
+
59
+ Enter, F2, a double-click or typing opens the editor (typing starts with that character). Enter commits, Tab and Shift+Tab commit and open the next or previous editable cell, leaving the editor commits, and Esc cancels.
60
+
61
+ `validate: [{ pass: <condition>, message }]` and `required: true` check an edit before it commits: a failing check keeps the editor open with the message. Leaves without `key` test the cell value, leaves with `key` read the edited row. Cells of changed and added rows that fail are marked in the table. Lowdefy block validation (`validate` and `required` on the block itself) runs on the value, the changes, not on the rows.
62
+
63
+ ## Adding, deleting and moving rows
64
+
65
+ ```yaml
66
+ - id: lines
67
+ type: TableInput
68
+ properties:
69
+ data:
70
+ _request: get_invoice.0.lines
71
+ addRow: true # a "+ Add row" row under the table
72
+ addRowText: Add line
73
+ rowActions:
74
+ delete: true # a delete button on every row
75
+ deleteRows: true # Delete or Backspace deletes the focused row
76
+ rowDrag:
77
+ positionField: position
78
+ defaultView:
79
+ sort:
80
+ - key: position
81
+ columns:
82
+ - key: description
83
+ editable: true
84
+ required: true
85
+ - key: qty
86
+ type: number
87
+ editable: true
88
+ default: 1
89
+ - key: price
90
+ type: currency
91
+ editable: true
92
+ default: 0
93
+ aggregate: sum
94
+ ```
95
+
96
+ - "+ Add row" appends a row with each column's `default` (and, with a `positionField`, a position after the last row, across every page with `pagination`) and opens its first editable cell.
97
+ - `rowDrag` adds a drag handle, and Alt+Shift+Up/Down moves the focused row. With `positionField`, a move gives only the moved row a new position, the midpoint of its new neighbours, so saving it writes one field. When there is no room left between two positions (a gap under 1e-6) the list is renumbered in steps of 1024 and every changed position is recorded. Without a `positionField`, the full key `order` is recorded instead.
98
+ - Moves are blocked while the table is sorted by anything but the position field ascending, filtered or grouped; the handle's tooltip says why.
99
+
100
+ ## Undo, redo and paste
101
+
102
+ - Cmd/Ctrl+Z undoes and Cmd/Ctrl+Shift+Z or Ctrl+Y redoes, over the last 100 changes.
103
+ - Cmd/Ctrl+V pastes tab-separated text (not with `keyboard: false`), as a spreadsheet copies it, over the cells from the focused one: down the displayed rows and across the visible columns. Each value is coerced to the column type and validated. Cells that are not editable, fail validation or fall outside the table are skipped and reported in `onChange` `skipped`; paste never adds rows.
104
+ - Cmd/Ctrl+C copies the selected rows, or the focused cell, as tab-separated displayed text, also with `keyboard: false`.
105
+
106
+ ## Loading states
107
+
108
+ TableInput loads like [`Table`](/TableGuide#loading-states): skeleton rows under the real header while `loading` is true and `data` has no rows (also while its code loads), the rows and a progress bar under the header while a refetch runs (the rows stay even while `_request` returns null), and "No rows" (`emptyText`) when there are none. The changes in its value stay through a refetch: they apply by row key to whatever rows `data` holds.
109
+
110
+ ## Saving
111
+
112
+ `MongoDBTableChanges` saves the value in one request. Pass the value as the payload and list the columns it may write in `fields`, keyed by the column `field` (the changeset keys; `MongoDBTableQuery` keys its `fields` by column `key` instead):
113
+
114
+ ```yaml
115
+ requests:
116
+ - id: save_lines
117
+ type: MongoDBTableChanges
118
+ connectionId: invoices
119
+ payload:
120
+ invoice_id:
121
+ _url_query: id
122
+ changes:
123
+ _state: lines
124
+ properties:
125
+ array: # the rows are items of an array in one document
126
+ documentId:
127
+ _payload: invoice_id
128
+ path: lines
129
+ filter:
130
+ org_id:
131
+ _user: organization.id
132
+ positionField: position
133
+ fields:
134
+ description:
135
+ type: text
136
+ qty:
137
+ type: number
138
+ price:
139
+ type: currency
140
+ changes:
141
+ _payload: changes
142
+ ```
143
+
144
+ Then check the response, refetch `data` and call `resetChanges`. `unmatchedKeys` lists the rows the changes named that matched nothing (deleted by someone else, or outside the `filter`): nothing was written for them, so treat a non-empty list as a failed save:
145
+
146
+ ```yaml
147
+ - id: save
148
+ type: Button
149
+ properties:
150
+ title: Save
151
+ events:
152
+ onClick:
153
+ - id: save_lines
154
+ type: Request
155
+ params: save_lines
156
+ - id: check_saved
157
+ type: Throw
158
+ params:
159
+ throw:
160
+ _gt:
161
+ - _array.length:
162
+ _if_none:
163
+ - _request: save_lines.unmatchedKeys
164
+ - []
165
+ - 0
166
+ message: Some lines were changed or removed by someone else. Reload and try again.
167
+ - id: refetch
168
+ type: Request
169
+ params: get_invoice
170
+ - id: reset
171
+ type: CallMethod
172
+ params:
173
+ blockId: lines
174
+ method: resetChanges
175
+ ```
176
+
177
+ Leave out `array` when every row is its own document (collection mode). New rows are stamped with the `filter`'s equality conditions (such as `org_id`), and `insertDefaults` sets other values they start with, such as the creator; `fields` can never write a `filter` or `insertDefaults` field, and row values never override `insertDefaults`. Only `fields` can be written, values are coerced to their type, and the base `filter` scopes every operation. The [Table guide](/Table) has complete array and collection mode pages, and [MongoDBTableChanges](/MongoDB) the full reference.
178
+
179
+ Any other save path works too: the value is plain data, so a request can read `_payload: changes.updated`, `changes.added` and `changes.removed` and write them however the backend needs.
180
+
181
+ ```yaml
182
+ - id: contacts_input
183
+ type: TableInput
184
+ properties:
185
+ columns:
186
+ - key: name
187
+ editable: true
188
+ required: true
189
+ - key: email
190
+ type: email
191
+ width: 220
192
+ editable: true
193
+ - key: role
194
+ type: tag
195
+ editable: true
196
+ options:
197
+ - Buyer
198
+ - Champion
199
+ - Finance
200
+ - key: active
201
+ type: boolean
202
+ width: 100
203
+ editable: true
204
+ data:
205
+ - _id: c1
206
+ name: Ada Lovelace
207
+ email: ada@example.com
208
+ role: Champion
209
+ active: true
210
+ - _id: c2
211
+ name: Grace Hopper
212
+ email: grace@example.com
213
+ role: Buyer
214
+ active: false
215
+ ```
216
+
217
+ ```yaml
218
+ - id: invoice_lines
219
+ type: TableInput
220
+ properties:
221
+ addRow: true
222
+ addRowText: Add line
223
+ rowActions:
224
+ delete: true
225
+ columns:
226
+ - key: description
227
+ width: 260
228
+ editable: true
229
+ validate:
230
+ - pass:
231
+ op: notEmpty
232
+ message: Describe the line.
233
+ - key: qty
234
+ type: number
235
+ width: 100
236
+ editable: true
237
+ default: 1
238
+ validate:
239
+ - pass:
240
+ op: gt
241
+ value: 0
242
+ message: The quantity must be more than 0.
243
+ - key: price
244
+ type: currency
245
+ width: 140
246
+ editable: true
247
+ default: 0
248
+ aggregate: sum
249
+ data:
250
+ - _id: l1
251
+ description: Design workshop
252
+ qty: 1
253
+ price: 1800
254
+ - _id: l2
255
+ description: Implementation days
256
+ qty: 5
257
+ price: 950
258
+ ```
259
+
260
+ ```yaml
261
+ - id: recipe_steps
262
+ type: TableInput
263
+ properties:
264
+ addRow: true
265
+ rowDrag:
266
+ positionField: position
267
+ defaultView:
268
+ sort:
269
+ - key: position
270
+ columns:
271
+ - key: step
272
+ width: 280
273
+ editable: true
274
+ - key: position
275
+ type: number
276
+ width: 110
277
+ data:
278
+ - _id: s1
279
+ step: Mix the flour and water
280
+ position: 1024
281
+ - _id: s2
282
+ step: Rest for an hour
283
+ position: 2048
284
+ - _id: s3
285
+ step: Bake at 250°C
286
+ position: 3072
287
+ ```
288
+
289
+ ```yaml
290
+ - id: ingredients_input
291
+ type: TableInput
292
+ properties:
293
+ rowKey: id
294
+ deleteRows: true
295
+ columns:
296
+ - key: ingredient
297
+ editable: true
298
+ - key: grams
299
+ type: number
300
+ editable: true
301
+ data:
302
+ - id: flour
303
+ ingredient: Flour
304
+ grams: 500
305
+ - id: salt
306
+ ingredient: Salt
307
+ grams: 10
308
+ - id: ingredients_reset
309
+ type: Button
310
+ properties:
311
+ title: Reset changes
312
+ size: small
313
+ events:
314
+ onClick:
315
+ - id: ingredients_reset_call
316
+ type: CallMethod
317
+ params:
318
+ blockId: ingredients_input
319
+ method: resetChanges
320
+ ```
321
+
322
+ | Property | Type | Default | Description |
323
+ | --- | --- | --- | --- |
324
+ | `columns` | array \| null | - | The columns, in default order. |
325
+ | `defaultColumn` | object | - | Defaults applied to every column. |
326
+ | `defaultColumn.sortable` | boolean | `true` | Sort by clicking the header (Shift+click adds to a multi-sort). Defaults to `defaultColumn.sortable` (true). |
327
+ | `defaultColumn.filterable` | boolean | `true` | Offer the column in filters: the header menu "Filter…" item and the filter builder. |
328
+ | `defaultColumn.resizable` | boolean | `true` | Resize the column by dragging the right edge of its header. |
329
+ | `defaultColumn.groupable` | boolean | `false` | Allow grouping rows by this column (view `group`, the `setGroup` method, the header menu). Default false. |
330
+ | `defaultColumn.editable` | boolean \| object | `false` | Edit cells of this column: `true`, or `{ when: Condition }` to allow it per row. The editor comes from the type: text, email, phone and url edit as text; number, currency and percent as a number; date and datetime with a date picker; boolean with a switch; tag and status select from `options`; tags select several; rating with stars. Enter, F2, double-click or typing opens it; Enter, Tab or leaving commits; Esc cancels. Table fires onCellEdit; TableInput writes its value. |
331
+ | `defaultColumn.editable.when` | object | - | Condition tested against the row (and the cell value, for leaves without `key`) that decides whether the cell is editable. |
332
+ | `defaultColumn.width` | number | - | Column width in pixels. Default 160. |
333
+ | `defaultColumn.minWidth` | number | - | Minimum width in pixels when resizing. Default 48. |
334
+ | `defaultColumn.maxWidth` | number | - | Maximum width in pixels when resizing. |
335
+ | `defaultColumn.ellipsis` | integer \| boolean | - | Clamp the text to this many lines (`true` is one) with an ellipsis; the full text shows on hover. More than one line makes rows as tall as their content. |
336
+ | `defaultColumn.wrap` | boolean | `false` | Wrap long text; rows grow to fit (measured row heights, which turn column virtualisation off). Text stays on one line by default. |
337
+ | `data` | array | - | The rows to edit. They are never written: the changes are the block value, shown over the rows. |
338
+ | `rowKey` | string | - | Dot path to the unique row key. Defaults to `_id`, then `id`. Changes are recorded by key, so rows need a key. A row added in the table shows its temporary key in this field (default `_id` when the data uses it, else `id`). |
339
+ | `rowVersionField` | string | - | Dot path to a field that changes whenever a row changes (for example `updated.timestamp`). When set, rows are compared by key and this field instead of by content; a row without it is compared by content. |
340
+ | `user` | object | - | The user object for `$user` values in filters, `rules`, `rowRules` and button `hidden`/`disabled` conditions, usually `{ _user: true }`. Blocks do not see the session, so conditions read `$user` from this property. |
341
+ | `defaultView` | object | - | The initial and reset view. Parts missing from the table value fall back to this, then to the column defaults. |
342
+ | `defaultView.columns` | array | - | Column order, widths, pinning and visibility. |
343
+ | `defaultView.columns.$.key` | string | - | |
344
+ | `defaultView.columns.$.width` | number | - | |
345
+ | `defaultView.columns.$.pinned` | string | - | Pin the column to the start or end, where it stays visible while scrolling. Enum: `start`, `end`. |
346
+ | `defaultView.columns.$.hidden` | boolean | - | |
347
+ | `defaultView.collapsedColumnGroups` | array | - | Keys of the collapsed collapsible column groups, over the groups' own `collapsed`. A group's key is its `key`, else `group:<index>` (`group:2.0` for the first group inside the third). |
348
+ | `defaultView.sort` | array | - | Sort order: `[{ key, desc }]`. |
349
+ | `defaultView.sort.$.key` | string | - | |
350
+ | `defaultView.sort.$.desc` | boolean | - | |
351
+ | `defaultView.filter` | object \| null | - | Filter condition: `{ and: [...] }` / `{ or: [...] }` groups of `{ key, op, value }` leaves. Operators depend on the column type; `{ $user: path }` values read the `user` property. |
352
+ | `defaultView.search` | string \| null | - | Search text: rows match when every word appears (case-insensitive) in the display text of the searched columns. |
353
+ | `defaultView.group` | array | - | Group rows by these columns, outermost first: `[{ key }]`. Only columns with `groupable: true` group; groups follow the sort on their column, else option order, else first appearance, and empty values group as "(Empty)" last. |
354
+ | `defaultView.group.$.key` | string | - | |
355
+ | `defaultView.collapsedGroups` | array | - | Keys of collapsed groups: the JSON of the group value path, for example `["lead"]` or `["EMEA","Ada"]` (empty values are `null`). |
356
+ | `defaultView.aggregates` | object | - | Aggregates by column key, for example `{ amount: sum, deals: count }`, over the columns' own `aggregate`. `null` turns a column default off. Group headers show them under their columns. |
357
+ | `defaultView.density` | string | - | Row density: compact 32px, default 40px, comfortable 52px rows. Defaults to `size`. Enum: `compact`, `default`, `comfortable`. |
358
+ | `defaultView.wrap` | boolean | - | Wrap the text of text-like columns (text, email, phone, url, link, html, relation) that set no `wrap` or `ellipsis` of their own; rows grow to their content. The toolbar density control has a Wrap toggle. |
359
+ | `defaultView.pageSize` | integer | - | Rows per page when pagination is on. Defaults to the `pageSize` property. |
360
+ | `rowSelection` | object | - | Turn on row selection. The selection is the `selected` part of the table value. |
361
+ | `rowSelection.type` | string | `"checkbox"` | Multiple (checkbox) or single (radio) selection. Enum: `checkbox`, `radio`. |
362
+ | `rowSelection.preserve` | boolean | `false` | Keep selected keys of rows that leave `data`. Always on in server mode. |
363
+ | `rowSelection.cascade` | boolean | `false` | In a tree, selecting or clearing a row also selects or clears all its descendants. |
364
+ | `tree` | object | - | Show rows as a tree (client data only): rows are indented under their parent with an expand chevron in the first column, Right and Left expand and collapse, sorting sorts within each level and a filter keeps the ancestors of matching rows. The expanded row keys are the `expanded` part of the table value. Give exactly one of `childrenField` or `parentField`. |
365
+ | `tree.childrenField` | string | - | Dot path to each row's child rows (nested data). |
366
+ | `tree.parentField` | string | - | Dot path to the row key of each row's parent (flat data). Rows whose parent is not in `data` are roots. |
367
+ | `tree.lazy` | boolean | `false` | Load children on demand: rows whose `hasChildrenField` is true show a chevron before their children are loaded, expanding a row fires `onRowExpand` with `needsChildren: true` until its children are in `data`, and the app adds them (for example a request whose result is merged into the data with `parentField` set). |
368
+ | `tree.hasChildrenField` | string | `"hasChildren"` | With `lazy`, the field that marks rows with children that are not loaded yet. |
369
+ | `tree.indent` | number | `20` | Indent per level in pixels. |
370
+ | `expandable` | object | - | Expandable rows: a chevron in the first column opens a detail row below the row, as high as its content. The expanded row keys are the `expanded` part of the table value. |
371
+ | `expandable.template` | string | - | Nunjucks HTML for the detail row, rendered with `row` and `rowKey`. Output is escaped: use `\| safe` to insert HTML from a field. The HTML is sanitised. |
372
+ | `expandable.rowExpandable` | object | - | Which rows can expand. |
373
+ | `expandable.rowExpandable.when` | object | - | A condition (`{ key, op, value }`, or `and` / `or` lists) tested against the row. |
374
+ | `rowLink` | object | - | Make rows links. A plain click navigates, Cmd/Ctrl or middle click opens a new tab, and Enter on a focused row follows it. Values in `urlQuery` and `pathParams` are row paths. |
375
+ | `rowLink.pageId` | string | - | The page to open. |
376
+ | `rowLink.href` | string | - | A URL to open instead of a page. |
377
+ | `rowLink.urlQuery` | object | - | Query parameters; each value is a path in the row, like `{ _id: _id }`. |
378
+ | `rowLink.pathParams` | object | - | Values for the page path's placeholders; each value is a path in the row, like `{ ticket_id: _id }`. |
379
+ | `rowLink.input` | object | - | Input for the page. |
380
+ | `rowLink.newTab` | boolean | - | Always open in a new tab. |
381
+ | `rowRules` | array | - | Conditional row formatting: `[{ when, className, style, color }]`, where `when` conditions name columns by `key`. |
382
+ | `size` | string | `"default"` | Row density: compact 32px, default 40px, comfortable 52px rows. The view starts at this density (`view.density` overrides it). Enum: `compact`, `default`, `comfortable`. |
383
+ | `bordered` | boolean | `false` | Draw borders between cells. |
384
+ | `height` | number \| string | - | A fixed table height (px number or CSS size); the rows scroll under a sticky header and the summary row stays in view. Without it the table grows with its rows up to `maxHeight`. |
385
+ | `maxHeight` | number \| string | `600` | Maximum height when `height` is not set. |
386
+ | `rowHeight` | number | - | Row height in pixels. Overrides the density height. |
387
+ | `virtual` | - | `"auto"` | Virtualise rows and columns. `auto` virtualises rows above 200 and columns above 20 or when the table is wider than twice its viewport. Enum: `auto`, `true`, `false`. |
388
+ | `stickyHeader` | boolean | `true` | Keep the header visible while the table scrolls. |
389
+ | `rowDrag` | boolean \| object | - | Reorder rows by dragging a handle in a leading column, or with Alt+Shift+ArrowUp/Down on a focused row. Not available while the table is sorted (except ascending by the position field), filtered or grouped, in a tree or in server mode; the handle is disabled with a tooltip saying why. Table fires onRowMove; TableInput records the move in its value. `true`, or `{ positionField }` for fractional positions. |
390
+ | `rowDrag.positionField` | string | - | Dot path of a numeric position field the rows are ordered by. A move gives only the moved row a new position: the midpoint of its new neighbours (a neighbour ∓ 1024 at the ends), renumbering the list in steps of 1024 only when there is no room left. |
391
+ | `headerMenu` | boolean | `true` | Show the column menu button in each header (on hover or focus): sort, filter, pin, freeze, autosize, hide and the column manager. |
392
+ | `reorderable` | boolean | `true` | Reorder columns by dragging their headers. |
393
+ | `keyboard` | boolean \| object | `true` | Keyboard navigation between cells. Grid roles stay on when off, and so do Ctrl/Cmd+C copy and the keys of a focused group header. An object turns it on with options. |
394
+ | `keyboard.next` | boolean | `false` | After a row button, menu item or single-key action completes, move focus to the next row (queue and triage lists). |
395
+ | `toolbar` | boolean \| object | `false` | The toolbar above the table. `true` turns on every item; an object turns on the listed items. |
396
+ | `toolbar.views` | boolean | `false` | Saved view tabs (needs `views`), with the unsaved changes strip. |
397
+ | `toolbar.search` | boolean | `false` | A search box that writes `view.search` (Cmd/Ctrl+F focuses it while the table has focus). |
398
+ | `toolbar.quickFilters` | array | - | Column keys to show as quick filter chips. Columns with `options` get a checkbox list (an `in` condition); others open the column filter. |
399
+ | `toolbar.filter` | boolean | `false` | A Filter button that edits the whole `view.filter`. |
400
+ | `toolbar.sort` | boolean | `false` | A Sort button to add, remove, reorder and flip sort levels. |
401
+ | `toolbar.group` | boolean | `false` | A Group button to pick and order group levels (groupable columns). |
402
+ | `toolbar.columns` | boolean | `false` | A Columns button that opens the column manager. |
403
+ | `toolbar.density` | boolean | `false` | A compact / default / comfortable density toggle, with a Wrap toggle for `view.wrap`. |
404
+ | `toolbar.export` | boolean | `false` | An Export button that downloads the view as CSV. |
405
+ | `views` | array \| null | - | Saved views, from any source (often a request). Selecting a tab loads its view; changes show an unsaved changes strip with Save, Save as and Discard. |
406
+ | `activeView` | string \| number \| object \| null | - | The id of the active saved view (an ObjectId id matches by its hex). Defaults to the first view. Changing it selects that view. |
407
+ | `persist` | object | - | Keep the user's view between visits. Off by default. The selection is never persisted. |
408
+ | `persist.key` | string | - | Storage key (localStorage) or query parameter name (url). |
409
+ | `persist.storage` | string | `"local"` | `local` keeps the view in localStorage, per app and per signed-in user and cleared at sign-out (none in a private window or with blocked storage); `url` writes a compact encoding to the query string, replacing history. Enum: `local`, `url`. |
410
+ | `emptyText` | string | `"No rows"` | What to show when there are no rows - supports html. |
411
+ | `loading` | boolean | `false` | Show the loading state: skeleton rows without data, a progress bar with it. |
412
+ | `pagination` | boolean | `false` | Show the rows in pages of `pageSize` with a pager below the table. Off by default, unlike TableLight: the Table scrolls any number of rows virtually. `true` means what it means on TableLight: pages, with the pager always shown. |
413
+ | `pageSize` | integer | `50` | Rows per page when `pagination` is on (`view.pageSize` overrides it). |
414
+ | `addRow` | boolean | `false` | Show a "+ Add row" row under the table. A new row gets each column `default` (and, with `rowDrag.positionField`, a position after the last row), and opens its first editable cell. |
415
+ | `addRowText` | string | `"Add row"` | Text of the add-row row. |
416
+ | `summary` | boolean | `true` | Show the summary footer when `summaryRow` is set or any aggregate is in effect: a column `aggregate`, or one the view sets in `view.aggregates`. `false` hides it. |
417
+ | `summaryRow` | object \| null | - | A row the app computed, such as a report total from the request, shown in the summary footer in place of the aggregates. Each column renders it like a body row, with its `type`, `cell` and `rules`; action columns stay empty. It is not a data row: sorting, filtering, search, selection and the record count leave it out, and `exportCsv` adds it as the last line (in server mode `onExport` produces the file). Group headers keep their aggregates. |
418
+ | `deleteRows` | boolean | `false` | Delete the focused row with the Delete or Backspace key. |
419
+ | `rowActions` | object | - | Row controls shown in a leading column. |
420
+ | `rowActions.delete` | boolean | `false` | A delete button on every row. |
421
+
422
+ | Event | Event Data | Description |
423
+ | --- | --- | --- |
424
+ | `onChange` | `{ value, cause, rowKey, skipped }` | Trigger when the changes change through the table: a cell edit, an added, deleted or moved row, a paste, or an undo or redo. |
425
+ | `onSelectionChange` | `{ selected, rows }` | Trigger when the row selection changes. "Select all matching" in the bulk bar (and, in server mode, the header checkbox) selects every row the view matches as `{ all: true, except, filter, search }`: every row matching that filter and search except the `except` keys, so a request can resolve it from the value alone. Changing the filter or search clears such a selection. |
426
+ | `onRowExpand` | `{ row, rowKey, expanded, needsChildren }` | Trigger when a tree row or an expandable row is expanded or collapsed. With `tree.lazy`, load the row's children here when `needsChildren` is true (skip the load action otherwise) and add them to `data`. |
427
+ | `onExport` | `{ view, filename, formatted }` | Server mode: trigger when `exportCsv` is called. The browser only holds the loaded blocks, so produce the file from the view, for example with a request and a download action. |
428
+ | `onRowClick` | `{ row, rowKey, index }` | Trigger when a row is clicked, or activated with Enter. Clicks on buttons, links, menus and `data-event` elements in a cell, and clicks that end a text selection, do not trigger it. With `rowLink`, a plain click runs onRowClick instead of following the link. |
429
+ | `onRowDoubleClick` | `{ row, rowKey, index }` | Trigger when a row is double clicked. |
430
+ | `onCellClick` | `{ row, rowKey, column, value }` | Trigger actions when a cell is clicked. Clicks on controls in the cell do not trigger it. |
431
+ | `onViewSelect` | `{ id }` | Trigger when a saved view tab is selected, after its view loads. |
432
+ | `onViewSave` | `{ view, id, title, shared }` | Trigger when the user saves the current view: Save (with the active view `id`) or Save as (no `id`, a new view). The app stores views; update `views` (and `activeView`) with the result. |
433
+ | `onViewDelete` | `{ id }` | Trigger when the user deletes a saved view from its tab menu. |
434
+ | `onCellLink` | `{ link, row, value }` | Triggered when a link, avatar link or relation cell is clicked. The link navigates by itself; this event is for anything else to do. |
435
+ | `onCellButton` | `{ row, rowKey, value, button, buttonIndex }` | Documentation reference - the event fired is the `eventName` of each button in a `buttons` cell. Define any number of named events on the block, such as `onEdit`. |
436
+ | `onCellMenuItem` | `{ row, rowKey, value, item, itemIndex }` | Documentation reference - the event fired is the `eventName` of each item in a `menu` cell. |
437
+
438
+ | Key | Target |
439
+ | --- | --- |
440
+ | `/block` | Outer block wrapper (always available). |
441
+ | `/element` | The table root element. |
442
+ | `/header` | The header row group. |
443
+ | `/row` | Every body row. |
444
+
445
+ No slots defined.