nicolaskruchten / pivottable

Open-source Javascript Pivot Table (aka Pivot Grid, Pivot Chart, Cross-Tab) implementation with drag'n'drop.
https://pivottable.js.org/
MIT License
4.33k stars 1.07k forks source link

pvtFilterBox position #1332

Closed kakjzi closed 1 year ago

kakjzi commented 1 year ago

hi

The drop down menu position in the pivot table was not showing up correctly.

However, I've solved this problem and I'll share it in case anyone else needs help.

The solution is simple, you just need to fix some parts of your pivot.js file

Before

 triangleLink = $("<span>").addClass('pvtTriangle').html(" &#x25BE;").bind("click", function(e) {
            var left, ref2, top;
            ref2 = $(e.currentTarget).position(), left = ref2.left, top = ref2.top;
            return valueList.css({
              left: left + 10,
              top: top + 10
            }).show();
          });

After

triangleLink = $("<span>").addClass('pvtTriangle').html(" &#x25BE;").bind("click", function(e) {
            var left, ref2, top;
            ref2 = $(e.currentTarget).offset(), left = ref2.left, top = ref2.top;   // <--change
            return valueList.css({
              left: left + 10,
              top: top + $(e.currentTarget).outerHeight() + 10    // <--change
            }).show();
          });
juanmantelli commented 1 year ago

Thanks for sharing that. I am not a JS developer expert so I can not help that much, however, it will be great if we try to get back live this repo again.