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

Default fragment destination #15

Merged
merged 1 commit into from
Mar 20, 2024
Merged

Default fragment destination #15

merged 1 commit into from
Mar 20, 2024

Conversation

jayohms
Copy link
Contributor

@jayohms jayohms commented Mar 20, 2024

This adds the ability to set a default fragment destination. If you have not loaded a path configuration with a matching rule and a uri available for all possible paths, this destination will be used as the default. To set a default:

Hotwire.defaultFragmentDestination = WebFragment::class

Additionally, the library's HotwireWebFragment destination is set as the initial default, making it possible to use the library without registering your own fragment destinations or setting up a path configuration file. It's much easier to spin up a new app and then further customize as you go.

…custom destination or haven't loaded a path configuration with a matching rule
@jayohms jayohms merged commit 678b23c into main Mar 20, 2024
@jayohms jayohms deleted the default-destination branch March 20, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant