-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
[FEAT] Automatic height panes based on pane content #113
Comments
@sjregan Height of pane based on breakpoints. If you need to increase height, set specific breakpoints. |
@roman-rr I want to display content in the pane without setting any breakpoints or specifying a In my use case I am disabling the dragging and forcing a set height that cannot be changed by the user. To achieve this I have to specify the height of the HTML elements in JavaScript, then I have to calculate the height based on the number of items in the list. Then once I've calculated the height I use it in the settings for the drawer pane. If the contents of the pane is not a simple list, this becomes more complicated. I would like an option that meant I didn't have to set breakpoints or height of the pane, the pane would automatically be tall enough to show all the content (up to a limit) within the pane. |
@sjregan thank you for details, i will work around. |
@sjregan Should fit your needs:
Will included in next release and available now at master. |
@roman-rr Amazing, thank you so much! |
I've had a play around with this today, a couple of issues I have found.
Screen.Recording.2021-01-19.at.4.02.12.pm.movIn the above example the CSS height set on DIV.pane on first open was 117px, on second open it was 140px. Adding a setTimeout() to ensure everything has loaded and settled did not make a difference. My current workaround is:
I present the drawer pane and then immediately destroy it. Then when the user opens it by clicking a button, the correct height is calcualted.
|
@roman-rr In case it helps, the issue persists in v1.2.2. |
@roman-rr I have figured out the issue. My SCSS was similar to:
This meant that the CSS was not applied until after the pane was initialised. By changing the SCSS to not use The following is still a problem, should I create a new issue for it?
|
In latest release this part should be completely fixed. Height should calculated include |
Hi @roman-rr , new CupertinoPane(HTMLElement, {
draggableOver: true,
backdrop: false,
showDraggable: true,
bottomClose: true,
fastSwipeClose: true,
buttonDestroy: false,
fastSwipeSensivity: 0,
fitHeight: true,
breacks: {
top: { enabled: true, bounce: false },
middle: { enabled: true, bounce: false },
bottom: { enabled: false },
},
}); but I have 2 problems:
Is this a feature not implemented with breakpoints, or am I configuring something wrong? |
What are you trying to add to Cupertino-Pane?
An option to allow the height of panes to be based on the content within the pane.
Describe your feature request detailed
Add an additional option to the settings (eg: contentBasedHeight: boolean). When set:
A maximum height setting would probably be required as well with the ability for content within the pane to scroll.
Is there an alternative at the latest version?
[ ] Yes (descripe the alternative)
[X] No
Is this related to an issue?
[ ] Yes (Give a link to the issue)
[X ] No
The text was updated successfully, but these errors were encountered: