-
Notifications
You must be signed in to change notification settings - Fork 6
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
Control node width #3
Conversation
problem before was: as we determined the anchor width by looking at containerRef we relied on the portaled container node to have already a calculated width set
Demo page for commit |
Demo page for commit |
Demo page for commit |
Demo page for commit |
Demo page for commit |
Codecov Report
@@ Coverage Diff @@
## master #3 +/- ##
==========================================
+ Coverage 85.71% 93.33% +7.61%
==========================================
Files 4 7 +3
Lines 147 180 +33
==========================================
+ Hits 126 168 +42
+ Misses 21 12 -9
Continue to review full report at Codecov.
|
Demo page for commit |
Demo page for commit |
Demo page for commit |
Demo page for commit |
Demo page for commit |
Demo page for commit |
There are still some problems when the page is resized so that there are horizontal scrollbars. |
Demo page for commit |
Merging this PR will not publish a release. |
This PR sets the width of the stick node so that it always stretches exactly to the screen limit. This will give the maximum available space to the node content while preventing that it reaches off-screen.
It also adds support for
sameWidth
prop, which will set the stick node width to the width of the anchor element. This is useful for building dropdown select fields, for example.It also removes support of the unofficial
nodeWidth
prop. It allowed to explicitly pass in a with for the stick node, but the same can be achieved by setting a width directly on the passed stick node.