-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Customize Handles #97
Comments
Hi @Gibbo3771. There is a similar request on #54. Out of interest, would you say the custom component you want to use for a resize handle has any element other than CSS styling? Potentially would you be able to set the resize handle size (with the |
I actually made a PR with what I had in mind #98. The change would give user complete control over how the handle is rendered, including it's props. The prop would take a function that is called for every handle on the space. This function will have access to the props for that particular handle. <LeftResizable handleRender={(props) => {
return <div {...props}></div>
}
>
// content
</LeftResizable> The above example would be the same as if you never used the |
@Gibbo3771 That's useful and I will definitely consider it, but just so I consider all alternatives is it because you want to provide your own styled handle or is there something else you would be doing there "with full access" to the resize API? |
This mostly came from me searching for a framework for a re-write of a large commercial app, we have specific styling and dragging anchor points on our current implementation, that we want to keep. Yes I could override the CSS, but I felt exposing the API in a controlled manner would be more appropriate. Everyone has different needs, and I guess it comes down to does this fit with your vision. Worth noting, I am usually in favour of extending sensible defaults, rather than overriding them. That's why I am not a fan of just overriding the CSS. |
Yes absolutely. I just want to check that I am not boxing myself in with
stuff I have in progress at the moment. I've got a lots of work on a
resize-handles branch for positional spaces which are not anchored (think
resizable windows kind of thing). Let me check compatibility with what's
there.
…On Fri, 20 Aug 2021, 19:26 Stephen Gibson, ***@***.***> wrote:
This mostly came from me searching for a framework for a re-write of a
large commercial app, we have specific styling and dragging anchor points
on our current implementation, that we want to keep. Yes I could override
the CSS, but I felt exposing the API in a controlled manner would be more
appropriate.
Everyone has different needs, and I guess it comes down to *does this fit
with your vision*.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#97 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC2G3RYXAIQ7T2FZ7EBIWLT52M57ANCNFSM5CJ4PLQA>
.
|
Prepping function in #103 |
Functionality has now been released in |
Is your feature request related to a problem? Please describe.
Handles can't be customized
Describe the solution you'd like
I want to customised the handles so that a custom component is rendered
Describe alternatives you've considered
I can't see anything except forking and changing it under the hood
Is there something I am missing here? I am currently exploring library options for a large re-write of a commercial application and this is one of the cleanest and well documented solutions that does exactly what we need.
The text was updated successfully, but these errors were encountered: