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

137
Views
Changing div parameter in Google programmable search does not rerender the page

I have build a React app containing a google programable search (cse). Within the div element I have added a custom parameter data-as_oq that is population with a state variable:

<div className='gcse-search' data-as_oq={this.state.myvariable}></div>

That parmeter is used to add search parameters to the google search (i.e. site:mysite.com). This works as expected when the app is rendered the first time. However, if I change this.state.myvariable the div is not re-rendered. I tried from setting the state with setState over to this.forceUpdate() withouth access. Not sure if this is intended behavior or if I am missing anything. Would appreciate any help!

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!