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

187
Views
En javascript, ¿cómo puedo ejecutar un comando cuando cambia el valor de una variable?

Tengo un detector de eventos que registra el valor de una segmentación de alternancia en mi aplicación. El interruptor puede tener un valor establecido en APAGADO o ENCENDIDO.

Tengo una variable llamada filteredValue que contiene el valor del estado de alternancia actual

 let filteredValue = state.filters[0].values;

Necesito aplicar una acción cuando cambia el valor de esa variable.

p.ej

 report.on('rendered', async () => { //get all pages const pages = await report.getPages() //get active page let activePage = pages.filter(function(page) { return page.isActive })[0]; //get visuals on active page let visuals = await activePage.getVisuals(); //find target visual const TargetVisual = visuals.filter(function(visual) { return visual.name === "259fea6751434e7910b4" })[0]; //get current state of visual const state = await TargetVisual.getSlicerState(); //get current state value (on or off ) let filteredValue = state.filters[0].values // DO SOMETHING HERE ONLY WHEN filteredValue CHANGES }
about 4 years ago · Juan Pablo Isaza
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!