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

204
Views
La transferencia de datos debería estar visible en otra página, pero estoy entrando en la tabla

El componente de Comment está devolviendo datos a una tabla. Quiero agregar una funcionalidad aquí: haga clic en description (la fila debería funcionar como enlace), redirige a otra página y mostrará solo los detalles de la descripción. La tabla tiene solo 3 columnas de description , severity y status .

 import React from "react"; import { Link } from "react-router-dom"; import IssuesDetails from "./issuesDetails"; export default class Comment extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); this.state = { href1: "", showingDetails: false, }; } componentDidMount(){ this.setState({pass:this.props.description}); } handleClick() { if (this.state.showingDetails) { // *** Already showing details, just turn the flag off this.setState({ showingDetails: false }); }else{ const result = window.confirm("Are you sure you want to view the details?"); if (result) { // *** Set the flag this.setState({ showingDetails: true }); } } } render() { const { showingDetails } = this.state; const href = showingDetails ? "/issues/details" : "/issues"; return ( <> {/* href={`/issues/details`} */} <tr> <td> <a href={href} onClick={this.handleClick}> {this.props.description} </a> </td> <td>{this.props.severity}</td> <td>{this.props.children}</td> </tr> {showingDetails ? <IssuesDetails pass={this.props.description} /> : null} </> ); } }

about 4 years ago · Santiago Trujillo
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!