Comments (3)
@gfazioli Excellent...I updated and tested and works great. Thanks for the quick fix.
from mantine-split-pane.
MANSP-1 Collapse/Expand Split.Pane with Double Click of Pane Gutter
from mantine-split-pane.
@bnapora Thank you! I'm glad you like the mantine-split-pane codebase.
Actually, this feature is already possible but due to a bug in version 0.2.2
, the double click was not being released correctly. Thanks to your report, I noticed it. 🙏
So, I have released version 0.2.3
with the double-click working and I have included an example that should address your request. Click here to see it in action
If you have any questions or need further assistance, feel free to ask!
import { Split } from '@gfazioli/mantine-split-pane';
import { Button, Group, Paper, Stack } from '@mantine/core';
import { useState } from 'react';
function Demo() {
const [initialWidth, setInitialWidth] = useState(200);
const handleDoubleClick = () => {
setInitialWidth(initialWidth === 200 ? 100 : 200);
};
return (
<Stack>
<Split>
<Split.Pane initialWidth={initialWidth} onDoubleClick={handleDoubleClick}>
<Paper withBorder w="100%" mih="100%">
<h3>
Swap
<br />
Double Click →
</h3>
</Paper>
</Split.Pane>
<Split.Pane>
<Paper withBorder w="100%" mih="100%">
<h2>Pane 2</h2>
</Paper>
</Split.Pane>
</Split>
</Stack>
);
}
from mantine-split-pane.
Related Issues (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 mantine-split-pane.