Skip to content

Comments

Add option to disable Turbo Drive/Turbolinks on redirectTo navigation#197

Merged
leastbad merged 1 commit intomasterfrom
redirect-to-without-turbo
May 20, 2022
Merged

Add option to disable Turbo Drive/Turbolinks on redirectTo navigation#197
leastbad merged 1 commit intomasterfrom
redirect-to-without-turbo

Conversation

@marcoroth
Copy link
Member

Type of PR

Enhancement

Description

@mepatterson asked on Discord if it's possible to use the redirectTo operation without using Turbo and Turbolinks even though it's actually installed and setup in the app. There are some edge-cases were you might want to not use the visit() function.

Why should this be added

This Pull Requests adds an option to disable the navigation with Turbo/Turbolinks in the redirectTo operation, since there is no simple way to disable the use of the Turbo[links].visit().

You could also solve this issue with a simple custom operation like:

CableReady.operations.navigate = (operation) => {
  window.location.href = operation.url
}

But it somehow seems redundant since there's already an operation which pretty handles this out of the box, if configured properly.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing
  • This is not a documentation update

@leastbad leastbad merged commit 9fdbc89 into master May 20, 2022
@leastbad leastbad deleted the redirect-to-without-turbo branch May 20, 2022 07:53
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.

3 participants