Comments (4)
I just bumped into this too.
It looks like some transition classes are being left on the target rather than being removed if one cycles the transition too fast. Once that happens, there is no way to recover other than refreshing the page (i.e., follow on requests to transition don't clear the lingering classes from the previous cycle)
@pySilver while ugly, ugly, ugly, I added a cleanup() as the first step in any functions that trigger a transition. The cleanup() basically does a target.classList.remove(...AllOfTheTransitionClasses) which seems to solve for now.
from stimulus-use.
@hms I've switched to el-transition which has promise support and had no issues since then.
from stimulus-use.
Is there any chance we can improve this in Stimulus Use as well, so that all people can benefit from it?
from stimulus-use.
@marcoroth I hate like hell asking for even more of your help given how much you contribute here and elsewhere, but the JS involved is a little over my head.
I've tried adding useThrottle to my code that triggers a transition with no luck. My cleanup() hack seems to work no matter how hard I push state changes. Part of the problem, at least in my code, is I'm also using useHotKeys -- so I have lots of places in my Stimulus controller where a state change could be asked for -- and it doesn't look like throttling is a solution.
If I can find some time, I can try with el-transition to see if their promise based solution is all we need. If that works, it would suggest a direction for useTransition -- and possibly a bunch of other use* functions.
If I can help, I'm willing to try -- but I'll need you to point me in the right directions given I'll be learning as I go.
Hal
from stimulus-use.
Related Issues (20)
- `useIdle`: Typescript error: argument of type 'this' is not assignable to parameter of type "IdleComposableController" HOT 1
- `useIntersection` and `appear@window` HOT 5
- Documentation / design discussion
- Deprecated Stimulus-1 Syntax HOT 2
- Possible to exclude hotkeys from generated JS? HOT 5
- `useIntersection`: Update docu or differentiate between option-parameters HOT 1
- `useMemo` does not work as described on `get` properties HOT 4
- `useDebounce` sometimes clears event.params HOT 5
- Unexpected console log output HOT 5
- ESLint failure upgrading to 0.52.0 HOT 5
- Version 0.51.2 broke tributejs usage. HOT 8
- Error: Unable to resolve specifier 'stimulus-use/hotkeys' HOT 5
- useMapReduce - feature request HOT 1
- Weird ruby files in 0.51.0 HOT 2
- `useIntersection`: unobserve after triggering `appear` callback HOT 4
- Documentation for `useIntersection` is ahead of published version HOT 1
- `useTransition`: Allow options override from html attributes HOT 3
- `useTransition`: Turbo drive - cannot properly disconnect HOT 1
- Cannot use import statement outside a module HOT 1
- useCookie - Feature request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stimulus-use.