Skip to content

Commit

Permalink
fix: interactivity bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris DeMartini committed May 13, 2020
1 parent 2e2ef61 commit e1ef4d7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class App extends Component {
// clickAction
);

this.applyMouseActionsToSheets(d, clickAction, getConfigFieldInternalName(clickField, this.state.tableauSettings));
this.applyMouseActionsToSheets(d, clickAction, clickField);
};

emptyClickCallBack = d => {
Expand All @@ -291,7 +291,7 @@ class App extends Component {
d,
);

this.applyMouseActionsToSheets(undefined, clickAction, getConfigFieldInternalName(clickField, this.state.tableauSettings));
this.applyMouseActionsToSheets(undefined, clickAction, clickField);
};

hoverCallBack = d => {
Expand All @@ -308,7 +308,7 @@ class App extends Component {
);

// if we are actually hovering on something then we should call this function
this.applyMouseActionsToSheets(d, hoverAction, getConfigFieldInternalName(hoverField, this.state.tableauSettings));
this.applyMouseActionsToSheets(d, hoverAction, hoverField);
}

applyMouseActionsToSheets = (d, action, fieldName) => {
Expand All @@ -335,13 +335,13 @@ class App extends Component {
if ( d ) {
// select marks or filter
const actionToApply = toHighlight ? selectMarksByField : applyFilterByField;
tasks.push(actionToApply(mappedFieldName, [d[mappedFieldName]], ConfigSheet));
// log('we are applyMouseActionsToSheets', d, action, fieldName, ConfigSheet, toHighlight, toFilter, d[fieldName], actionToApply);
tasks.push(actionToApply(fieldName, [d[mappedFieldName]], ConfigSheet));
// log('we are applyMouseActionsToSheets', d, action, fieldName, mappedFieldName, ConfigSheet, toHighlight, toFilter, d[mappedFieldName], actionToApply);

} else {
// clear marks or filer
const actionToApply = toHighlight ? clearMarksByField : clearFilterByField;
tasks.push(actionToApply(mappedFieldName, ConfigSheet));
tasks.push(actionToApply(fieldName, ConfigSheet));
}

Promise.all(tasks).then(() => {
Expand Down

0 comments on commit e1ef4d7

Please sign in to comment.