“Using a Field Strategy” documentation

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

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

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
55/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
typescript
領域
documentation

調査の方向性

リンク先の Lit Binder Field Strategy ドキュメントを開き、「Using a Field Strategy」セクションに移動します。オーバーライドされた getFieldStrategy メソッドが model をスーパークラスに渡すように例を更新し、その例が報告された Checkbox のバインディング動作を反映し、カスタムのテキストフィールド戦略を保持していることを確認します。

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

説明

hilla

Tell us about your request

I found an issue in this Lit Binder Field Strategy Docs. Using Vaadin 24.6.12.

When overriding the getFieldStrategy method and no model?: AbstractModel is given to the super call, the Checkbox value binding is broken. Changing the value in the form does result in a wrong value put in the bean:

  • true/checked is false
  • false/not checked is undefined

Suggested change in the documentation would be:

  override getFieldStrategy(element: any, model?: AbstractModel): FieldStrategy {
    if (element.localName === 'my-text-field' && model instanceof StringModel) {
      return new MyTextFieldStrategy(element);
    }
-  return super.getFieldStrategy(element);
+  return super.getFieldStrategy(element, model);
  }
}

If you think this issue is important, add a 👍 reaction to help the community and maintainers prioritize this issue.

主要言語
AsciiDoc
スター
38
フォーク
225
平均マージ
17時間 38分
マージ済み PR(30日)
214

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

vaadin/docs のほかの issue

vaadin/docs の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

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

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