|
1 | 1 | <template> |
2 | 2 | <input |
3 | | - :id="control.id + '-input'" |
| 3 | + :id="cell.id + '-input'" |
4 | 4 | :class="styles.control.input" |
5 | | - :value="control.data" |
6 | | - :disabled="!control.enabled" |
| 5 | + :value="cell.data" |
| 6 | + :disabled="!cell.enabled" |
7 | 7 | :autofocus="appliedOptions.focus" |
8 | 8 | :placeholder="appliedOptions.placeholder" |
9 | 9 | @change="onChange" |
|
14 | 14 |
|
15 | 15 | <script setup lang="ts"> |
16 | 16 | import { |
17 | | - ControlElement, |
| 17 | + CellProps, |
18 | 18 | isStringControl, |
19 | 19 | type RankedTester, |
20 | 20 | rankWith, |
21 | 21 | } from '@jsonforms/core'; |
22 | | -import { rendererProps, useJsonFormsControl } from '@jsonforms/vue'; |
23 | | -import { useVanillaControl } from '../util'; |
| 22 | +import { useJsonFormsCell } from '@jsonforms/vue'; |
| 23 | +import { useVanillaCell } from '../util'; |
24 | 24 |
|
25 | | -const props = defineProps(rendererProps<ControlElement>()); |
| 25 | +const props = defineProps<CellProps>(); |
26 | 26 |
|
27 | | -const input = useVanillaControl( |
28 | | - useJsonFormsControl(props), |
| 27 | +const input = useVanillaCell( |
| 28 | + useJsonFormsCell(props), |
29 | 29 | (target) => target.value || undefined |
30 | 30 | ); |
31 | | -const { styles, control, appliedOptions, onChange, isFocused } = input; |
| 31 | +const { styles, cell, appliedOptions, onChange, isFocused } = input; |
32 | 32 |
|
33 | 33 | defineOptions({ |
34 | 34 | tester: rankWith(1, isStringControl) as RankedTester, |
|
0 commit comments