Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: 1-use-drive
Choose a base branch
from

Conversation

yakitorii
Copy link
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