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

Hooking into start/finish resize events #32

Closed
Slapbox opened this issue Oct 16, 2019 · 4 comments
Labels

Comments

@Slapbox
Copy link

@Slapbox Slapbox commented Oct 16, 2019

Is your feature request related to a problem? Please describe.
I know <Info /> lets you tap into height/width, but not necessarily event start/finish.

We're moving from react-split-pane which allowed us to listen for a start/finish of resize. Specifically, if a user resizes past a certain point we want to handle it ourselves, but we want to allow users to trigger the action via ending their drag event, rather than trying to guess at when we should respond. Perhaps this is already possible in a way I'm overlooking.

Describe the solution you'd like
Ability to add props such as onDragStarted and onDragFinished to a space. (Those are the names used by react-split-pane.

Describe alternatives you've considered
A timer based solution to listen for no changes to size for X seconds, but definitely not ideal.

@aeagle aeagle added the enhancement label Oct 16, 2019
@aeagle

This comment has been minimized.

Copy link
Owner

@aeagle aeagle commented Oct 16, 2019

@Slapbox The drag start and drag end events would definitely be the way to go and should not be hard to implement. I will see if I can get these into an upcoming release.

@Slapbox

This comment has been minimized.

Copy link
Author

@Slapbox Slapbox commented Oct 16, 2019

Thanks @aeagle! I'm looking forward to it!

@aeagle

This comment has been minimized.

Copy link
Owner

@aeagle aeagle commented Oct 20, 2019

@Slapbox I've added resize event callback properties to resizable spaces in version 0.1.18:

onResizeStart: () => {}
onResizeEnd: (newSize) => {}

Hopefully this should also allow you to attempt the solution at #36 (comment) on issue #36.

@Slapbox

This comment has been minimized.

Copy link
Author

@Slapbox Slapbox commented Oct 21, 2019

That's awesome! Thank you! I'll give it a shot soon.

@Slapbox Slapbox closed this Oct 21, 2019
@Slapbox Slapbox reopened this Oct 22, 2019
@Slapbox Slapbox closed this Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.