Form inputs do not display associated list of errors
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
リンクされた CodeSandbox で問題を再現し、まず src/dataProvider.tsx とカスタム useSubmit フックを確認してください。次に packages/ra-core/src/form/setSubmissionErrors.ts を調べ、issue で言及されているリグレッションテストを追加してください。1つのフィールドに対する複数の API エラーが、フランス語と英語のエラーを含めて表示されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What you were expecting:
I would see two error texts below the input concerned by the error
What happened instead:
The input is actually red, showing there is an error, but not displaying the text provided by the API
Steps to reproduce:
- Go to this sandbox: https://codesandbox.io/s/broken-voice-dd8zth
- On the Tag page, try creating a tag (with french and english labels). Save.
- You should see the french error displaying correctly on the field while the english errors are not displaying
Related code:
Sanbox https://codesandbox.io/s/broken-voice-dd8zth?file=/src/dataProvider.tsx
I created a custom useSubmit hook whose purpose is to display errors associated to the fields concerned by the error
Other information:
From my investigation, the bug comes from the way setSubmissionErrors sets the error.
I'll try creating a merge request and adding a test to handle lists of errors associated to a field
Environment
- React-admin version: 4.4.3
- Last version that did not exhibit the issue (if applicable): N/A
- React version: 17
- Browser: Google Chrome: Version 106.0.5249.119 (Build officiel) (x86_64)
- Stack trace (in case of a JS error): N/A
- 主要言語
- TypeScript
- スター
- 27k
- フォーク
- 5.5k
- 平均マージ
- 1日 3分
- マージ済み PR(30日)
- 32
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
marmelab/react-admin のほかの issue
-
Blank page after logout when the app re-renders `<Admin>` during `authProvider.logout()`対応中かも @uchiha-suraj が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
marmelab/react-admin#11431 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Pagination: page button aria-labels are not translated on small screens対応中かも @Singmin が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
marmelab/react-admin#11427 ·
メンテナーはふだん 1 日以内に返信
-
Add emptyText property to SelectArrayInput対応中かも @kwitykwity が 60 日前に担当しました。 オープンenhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
marmelab/react-admin#10454 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1週間以上 初心者へのやさしさ 38/100
marmelab/react-admin#11426 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ra-data-graphql-simple: outdated graphql-ast-types-browser dependency causes npm peer warnings再び着手できるかも @bipul724 が 14 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
marmelab/react-admin#11395 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
marmelab/react-admin の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
メンテナーはふだん 2 日以内に返信
-
BeOS .json missingオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mihaip/infinite-mac#475 ·
-
Let TypeScript accept an initial object in ReactiveDict対応中かも @yograj-vijay-yadav が今日担当しました。 オープンbug good first issue help wanted workshop
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
meteor/meteor#14919 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
marmelab/atomic-crm#401 ·
メンテナーはふだん 1 日以内に返信
-
account: profile
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 5 日以内に返信