Estoy trabajando en un proyecto en React y Sharetribe flex, y estoy tratando de hacer una ventana emergente modal cuando el usuario hace clic en el botón. Modal se abre para mí, pero cuando quiero cerrarlo en "X", la función onCloseModal no cierra mi Modal. queria saber donde esta el error, gracias de antemano!!
export class EditListingAvailabilityFormComponent extends Component { state = { openModal: false, }; onClickButton = e => { e.preventDefault(); this.setState({ openModal: true}); }; onCloseModal = () => {enter code here this.setState({ openModal: false}); }; <Button onClick={this.onClickButton} className={css.submitButton} type="submit" inProgress={submitInProgress} disabled={submitDisabled} ready={submitReady} > {saveActionMsg} </Button> <Modal open={this.state.openModal} onClose={this.onCloseModal}> <h2> We would love to hear what you think! As we are constantly looking to improve our processes we would love to hear from you how the listing & the onboarding went! If you have 5 minutes to help us out we would be very grateful. Please <a href="https://docs.google.com/forms/d/e/1FAIpQLScopkXx5GPFGrCpqKTBBNk4lUxzPaiVotAXIe_rlNN6oIIvBQ/viewform?usp=sf_link"> Click here </a> here to proceed to the questionnaire. </h2> </Modal>