Skip to content

[demo-2]Turbo Framesを使って一覧部分を読み込む#9

Open
yakitorii wants to merge 1 commit into1-use-drivefrom
2-use-frame
Open

[demo-2]Turbo Framesを使って一覧部分を読み込む#9
yakitorii wants to merge 1 commit into1-use-drivefrom
2-use-frame

Conversation

@yakitorii
Copy link
Copy Markdown
Member

@yakitorii yakitorii commented Dec 12, 2022

やったこと

  • Tweet一覧部分をTurbo Framesを使って読み込む
    • 更新したい一覧部分を<%= turbo_frame_tag "emotions" do %>で囲む
    • 更新のトリガーにしたいフォームとリンクにdata: { turbo_frame: "emotions" }属性をつける

frame-emotions

確認

  • turbo-frame のidが付与されている
  • フォームに入力したままサイドバーの切り替えをしてフォームの内容が残る

できなくなったこと

フォームのエラー表示

公式ドキュメント

Turbo Reference:Frames

Turbo Handbook:Decompose with Turbo Frames

@yakitorii yakitorii changed the base branch from main to 1-use-drive December 12, 2022 06:43
@yakitorii yakitorii marked this pull request as ready for review December 12, 2022 06:44
フォーム送信時、検索アイコンクリック時に一覧部分のみ更新する
@yakitorii yakitorii changed the title [demo-2]Frameを使って一覧部分を読み込む [demo-2]Turbo Framesを使って一覧部分を読み込む Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant