No way to access errors for a group defined with `withFieldGroup`

オープン
#1,652 コメント 8 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
56/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript
領域
frontend

調査の方向性

まず withFieldGroup の実装とグループストアの状態から始め、次にリンクされた最小再現を使って、フォームレベルの errorMap エントリがどのように公開されるかを追跡します。期待されるアドレスグループの動作からグループレベルのエラー結果を定義し、個々のフィールドのレンダリングに依存せずにエラーを一覧表示できることを検証します。

索引モデルが issue の本文から書いたものです。

説明

type: enhancement v1 v2
Describe the bug

When defining a group using withFieldGroup, it would be helpful to get a list of all of the errors for the group.

As an example, I have an address group. I'd like to render a list of errors at the group level (as opposed to the individual field level:

Image

However, the group store only contains values. You can get the form-level errorMap and sort of work backwards, but that's somewhat difficult. It would be really nice if the group store had an errorMap or something similar.

Your minimal, reproducible example

https://bolt.new/~/sb1-ehaxlmcw

Steps to reproduce

Here is an example of the kind of form I mean.

Expected behavior

It should be possible to get the errors for a group.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

macOS/Chrome

TanStack Form adapter

None

TanStack Form version

1.15.1

TypeScript version

No response

Additional context

No response

主要言語
TypeScript
スター
6.8k
フォーク
705
平均マージ
1日 12時間
マージ済み PR(30日)
14

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/form のほかの issue

TanStack/form の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。