Skip to content

Commit e7be368

Browse files
committed
Merge remote-tracking branch 'chorobin/perf-annotations-deep-key-values' into perf-annotations-deep-key-values
2 parents 80f7859 + 9122d4e commit e7be368

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

docs/reference/classes/fieldapi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Use `field.state.value` instead.
213213
handleBlur(): void
214214
```
215215

216-
Defined in: [packages/form-core/src/FieldApi.ts:1628](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L1628)
216+
Defined in: [packages/form-core/src/FieldApi.ts:1625](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L1625)
217217

218218
Handles the blur event.
219219

@@ -229,7 +229,7 @@ Handles the blur event.
229229
handleChange(updater): void
230230
```
231231

232-
Defined in: [packages/form-core/src/FieldApi.ts:1621](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L1621)
232+
Defined in: [packages/form-core/src/FieldApi.ts:1618](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L1618)
233233

234234
Handles the change event.
235235

@@ -422,7 +422,7 @@ Replaces a value at the specified index.
422422
setErrorMap(errorMap): void
423423
```
424424
425-
Defined in: [packages/form-core/src/FieldApi.ts:1648](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L1648)
425+
Defined in: [packages/form-core/src/FieldApi.ts:1645](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L1645)
426426
427427
Updates the field's errorMap
428428
@@ -547,7 +547,7 @@ Updates the field instance with new options.
547547
validate(cause, opts?): unknown[] | Promise<unknown[]>
548548
```
549549
550-
Defined in: [packages/form-core/src/FieldApi.ts:1588](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L1588)
550+
Defined in: [packages/form-core/src/FieldApi.ts:1585](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L1585)
551551
552552
Validates the field value.
553553

packages/form-core/src/FieldApi.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,10 +1310,7 @@ export class FieldApi<
13101310
if (!field.instance) continue
13111311
const { onChangeListenTo, onBlurListenTo } =
13121312
field.instance.options.validators || {}
1313-
if (
1314-
cause === 'change' &&
1315-
onChangeListenTo?.includes(this.name)
1316-
) {
1313+
if (cause === 'change' && onChangeListenTo?.includes(this.name)) {
13171314
linkedFields.push(field.instance)
13181315
}
13191316
if (cause === 'blur' && onBlurListenTo?.includes(this.name as string)) {

packages/form-core/src/metaHelper.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,7 @@ export function metaHelper<
106106
const sortedFields = direction === 'up' ? fields : [...fields].reverse()
107107

108108
sortedFields.forEach((fieldKey) => {
109-
const nextFieldKey = updateIndex(
110-
fieldKey.toString(),
111-
direction,
112-
)
109+
const nextFieldKey = updateIndex(fieldKey.toString(), direction)
113110
const nextFieldMeta = formApi.getFieldMeta(nextFieldKey)
114111
if (nextFieldMeta) {
115112
formApi.setFieldMeta(fieldKey, nextFieldMeta)

0 commit comments

Comments
 (0)