@ederzeel/nuxt-schema-form-nightly 0.1.0-29140419.4bc9165 → 0.1.0-29150641.03bc83f

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.
@@ -12,13 +12,22 @@ const value = defineModel<number>({ required: true, default: 0 })
12
12
 
13
13
  <template>
14
14
  <div>
15
- <UFormField :label="props.title || id" :hint="!props.isRequired ? 'optional' : undefined"
16
- :description="props.description" :name="props.id">
17
- {{ props.type === 'integer' }}
18
- <UInputNumber v-model="value" class="w-full" orientation="vertical" :step="0.01"
19
- :stepSnapping="props.type === 'integer'" :format-options="{
15
+ <UFormField
16
+ :label="props.title || id"
17
+ :hint="!props.isRequired ? 'optional' : undefined"
18
+ :description="props.description"
19
+ :name="props.id"
20
+ >
21
+ <UInputNumber
22
+ v-model="value"
23
+ class="w-full"
24
+ orientation="vertical"
25
+ :step="0.01"
26
+ :stepSnapping="props.type === 'integer'"
27
+ :format-options="{
20
28
  minimumFractionDigits: props.type === 'number' ? 1 : undefined
21
- }" />
29
+ }"
30
+ />
22
31
  </UFormField>
23
32
  </div>
24
33
  </template>
@@ -63,18 +63,8 @@ const values = computed(() => {
63
63
  const columns = computed<TableColumn<{}>[]>(() => {
64
64
  const columns = props.columns ?? []
65
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
-
76
66
  if (props.editInline) {
77
- columns.push({
67
+ columns.unshift({
78
68
  id: 'expand',
79
69
  cell: ({ row }) =>
80
70
  h(UButton, {
@@ -89,6 +79,16 @@ const columns = computed<TableColumn<{}>[]>(() => {
89
79
  onClick: () => row.toggleExpanded()
90
80
  })
91
81
  })
82
+
83
+ if (!props.columns && 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
92
  }
93
93
 
94
94
  if (props.edit) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ederzeel/nuxt-schema-form-nightly",
3
- "version": "0.1.0-29140419.4bc9165",
3
+ "version": "0.1.0-29150641.03bc83f",
4
4
  "description": "A runtime form generator for nuxt",
5
5
  "type": "module",
6
6
  "exports": {