minutemailer / react-popup

React popup component
http://minutemailer.github.io/react-popup/
MIT License
208 stars 71 forks source link

React Popup does not access update state value #63

Open fawadshahdev opened 4 years ago

fawadshahdev commented 4 years ago

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