-
Notifications
You must be signed in to change notification settings - Fork 131
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
Added onResize callback #1
Conversation
Updated propTypes, added onResize call to handleMouseMove, moved listeners from document down to component
Hi, Thanks for contributing! I tested the code and found one problem: when dragging the splitter and mouse moves out of the containing area (browser window, for instance), splitter stops responding. In addition, I'm thinking that the Could you push a fix? I'm happy to include this new feature. |
Hi, I think the problem occurred because I moved Providing current size or position as event data is a good idea and should be easy to implement. |
Hi, Any luck on this yet? After some digging, I think some extra efforts might be needed to test document events. References: |
Hi. Maybe it's a good idea to rename |
Hi. Is there any update on this? |
Hi. I've updated the PR a few days ago. |
Hi, I tested the newest commit. It seems the dragging problem is not fixed? |
Which browser are you using? Tried Chrome and Firefox and can't reproduce the problem. |
Tried on Chrome. Splitter stops responding as soon as the cursor moves out of the browser window. |
Tested on Windows now and the splitter doesn't move when you're outside of the window but it continues when you move back in. If I move the listener back to For me it's not a deal breaker but we can close this PR if you're unhappy with this. |
Same behavior here. Sorry, but this is a blocker for me. I'll leave this PR open here for now, in case you get the chance to look into this. I posted several links a couple of days ago here, and some of them might be related to testing listeners of |
This feature would have been amazing, any plans on fixing the issues? |
Closing this as newest release adds this event and has better coverage test. |
Works! Thx! |
prevent unnecessary re-rendering on mouse up
Hi.
I need to update some stuff while resizing. With these changes you can add a callback do
SplitterLayout
. It will be called constantly while you are dragging the splitter (so maybe debouncing is needed here).Have fun 😃