Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Popup does not access update state value #63

Open
fawadshahdev opened this issue Aug 24, 2019 · 0 comments
Open

React Popup does not access update state value #63

fawadshahdev opened this issue Aug 24, 2019 · 0 comments

Comments

@fawadshahdev
Copy link

I am using react-popup. I have problem when I want to access update state value it not working . Mean, it not rendering UI if state is changed . When I closed pop up form then I clicked again then UI was reflected . I want if state is changed then I want to re-render UI Immediately , I don't want to form closed and re-open for new changes.

`

    Popup.create({
      title: popupTitle,
      content: (
        <div>
         <select
            name="taskType"
            onChange={this.handleChange}
            className="browser-default custom-select marginArea"
          >
            <option value="no">Task Type</option>
            <option value="meeting">Meeting</option>
            <option value="followUp">Follow Up</option>
            <option value="viewing">Viewing</option>
            <option value="reminder">Reminder</option>
            <option value="other">Other</option>
          </select>
          {this.state.isCustomer ? <p>Hello</p> : null}
       </div>
)})`

As you see I am trying to access this.state.isCustomer udpate value on base of update value I want to set some condition but I am not able to achieve my goal could someone please help me how to solve this problem .

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant