Skip to content

Commit

Permalink
fix(formula): fix tooltip flickering and crash when clicking
Browse files Browse the repository at this point in the history
Signed-off-by: Diana Lease <[email protected]>
  • Loading branch information
DianaLease committed Aug 20, 2020
1 parent cfb8c06 commit e1bf328
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
15 changes: 8 additions & 7 deletions packages/ui-contract-editor/src/lib/components/Formula/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ const Formula = React.forwardRef((props, ref) => {
setFormulaDependents({});
};

const formulaProps = {
id: data.name,
className: FORMULA,
const wrapperProps = {
onMouseEnter: () => handlerIn(),
onMouseLeave: () => handlerOut(),
// onClick: () => toggleConditional(conditionalPath),
...attributes,
};

const formulaProps = {
id: data.name,
className: FORMULA,
ref
};

Expand All @@ -87,12 +89,11 @@ const Formula = React.forwardRef((props, ref) => {
caretTop: 21,
caretLeft: 2,
tooltipHeight: 1.85,
contentEditable: false
};

const tooltipInstructions = 'FORMULA HERE';

return (
<span {...attributes}>
<span {...wrapperProps}>
<FormulaTooltip {...formulaTooltip}>
{data.code}
</FormulaTooltip>
Expand Down
1 change: 0 additions & 1 deletion packages/ui-contract-editor/src/lib/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ a {
border: #AF54C4 1px solid;
border-radius: 2px;
background-color: #fff;
cursor: pointer;
}

.optional:hover,
Expand Down

0 comments on commit e1bf328

Please sign in to comment.