@ederzeel/nuxt-schema-form-nightly 0.1.0-29133424.d9577c2 → 0.1.0-29140419.4bc9165

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.
@@ -62,6 +62,17 @@ const values = computed(() => {
62
62
 
63
63
  const columns = computed<TableColumn<{}>[]>(() => {
64
64
  const columns = props.columns ?? []
65
+
66
+ if (!props.columns && props.items.type === 'object') {
67
+ for (const column of Object.keys(props?.items?.properties).map<TableColumn<{}>>(x => ({
68
+ header: x,
69
+ accessorKey: x,
70
+ cell: ({ row }) => row.getValue(x)
71
+ }))) {
72
+ columns.push(column)
73
+ }
74
+ }
75
+
65
76
  if (props.editInline) {
66
77
  columns.push({
67
78
  id: 'expand',
@@ -80,16 +91,6 @@ const columns = computed<TableColumn<{}>[]>(() => {
80
91
  })
81
92
  }
82
93
 
83
- if (props.items.type === 'object') {
84
- for (const column of Object.keys(props?.items?.properties).map<TableColumn<{}>>(x => ({
85
- header: x,
86
- accessorKey: x,
87
- cell: ({ row }) => row.getValue(x)
88
- }))) {
89
- columns.push(column)
90
- }
91
- }
92
-
93
94
  if (props.edit) {
94
95
  columns.push({
95
96
  id: 'actions',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ederzeel/nuxt-schema-form-nightly",
3
- "version": "0.1.0-29133424.d9577c2",
3
+ "version": "0.1.0-29140419.4bc9165",
4
4
  "description": "A runtime form generator for nuxt",
5
5
  "type": "module",
6
6
  "exports": {