Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
8 changes: 5 additions & 3 deletions src/PivotTableUI.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@ export class DraggableAttribute extends React.Component {
}

toggleFilterBox(event) {
const bodyRect = document.body.getBoundingClientRect();
const relativeRect = document
.querySelector('.pvtUi')
.getBoundingClientRect();
const rect = event.nativeEvent.target.getBoundingClientRect();
this.setState({
open: !this.state.open,
top: 10 + rect.top - bodyRect.top,
left: 10 + rect.left - bodyRect.left,
top: 10 + rect.top - relativeRect.top,
left: 10 + rect.left - relativeRect.left,
});
this.props.moveFilterBoxToTop(this.props.name);
}
Expand Down
1 change: 1 addition & 0 deletions src/pivottable.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
color: #2a3f5f;
font-family: Verdana;
border-collapse: collapse;
position: relative;
}
.pvtUi select {
user-select: none;
Expand Down