-
-
Notifications
You must be signed in to change notification settings - Fork 279
removed top and left of filter box #56
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
Conversation
|
changed top and left attributes of filter box to address issue pivot filter box position #21. |
|
Thanks for this PR! Can you tell me a bit about where this is causing problems? Is it interacting badly with other CSS? It seems to work fine on the demo site... |
|
Ah, so I'm not seeing the same thing at all... If you go here https://react-pivottable.js.org/ and click on the triangle on macOS/Chrome you see: This is what I've seen in every OS/browser combination I've tried... Do you see something different? If so, could you tell me about your OS/browser? If not, then I suspect that there is other CSS on the page which is interfering with the built-in styles, and I would want to solve this problem in some other way than removing this code :) |
Hi Nicholas! Thank you for your reply. I figured out why this is behaving differently. It is because top and left of filter box are relative to body element's position. If there is any element between body and table that has relative position, then filter box position is going to be positioned relative to the element with top and left calculated from body element's position. To make the code more robust, I would like to suggest getting a position of the closest relative element (if there isn't such an element, then body element's position will be used). New suggested approach: What do you think about this approach? If you have other suggestions on this, please share with me :) |
|
Hi Nicholas! Hope this finds you well. I tried another approach because previous approach that I suggested is "hacky". This new approach is making pvtUi to have relative position and filter box uses pvtUi's position to compute its left and top. What do you think about this one? |
|
OK, I've played with this a bunch and I think that your original approach is the best way forward here. Thanks for your engagement on this! I'll likely just commit my own version of your first commit :) |



No description provided.