Skip to content

React Popup does not access update state value #63

@fawadshahdev

Description

@fawadshahdev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions