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

introduce tab isolation mode #324

Merged
merged 2 commits into from
Oct 9, 2020
Merged

Conversation

leastbad
Copy link
Contributor

@leastbad leastbad commented Oct 9, 2020

Type of PR (feature, enhancement, bug fix, etc.)

Enhancement

Description

Pass isolate: true to the SR initialization to put the library in tab isolation mode. SR-initiated CableReady events will only fire in the tab that created them.

StimulusReflex.initialize(application, { isolate: true })

Why should this be added

Some developers have users with multiple tabs open at once. This will ensure that those developers have a mechanism to restrict Reflex execution to only the tab which initiated them.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing

@hopsoft hopsoft merged commit b0001c2 into stimulusreflex:master Oct 9, 2020
@Shigawire
Copy link

This is so good. Thank you so much for this feature!

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