Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

110
Views
data-tooltip returns [Object object]

When displaying text in data-tooltip, the inscription [Object object] is displayed

import React from "react";
import { FormattedMessage } from "react-intl";

const translate = (id, value={}) => <FormattedMessage id={id} values={{...value}} />

export default translate;

<span>
  {translate("resizeImage")}
    <span
      class="material-icons tooltipped"
      data-tooltip={translate("ResizeImageInfo")}
    >
    info
</span>

enter image description here

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Seems like your translate("ResizeImageInfo") function return an object instead of a string

about 4 years ago · Juan Pablo Isaza Report

0

data-tooltip attribute only works with string. https://www.thesitewizard.com/html-tutorial/how-to-insert-tooltips.shtml

but your translate function returns React component. As a result it only shows [Object, object].

To implement tooltip feature in react please consider using this. https://www.npmjs.com/package/react-tooltip Or please consider implement this. tooltip div with ReactJS

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!