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

openByClickOn Not Displaying The Button In v4 #230

Open
padlock98 opened this issue Mar 31, 2020 · 0 comments
Open

openByClickOn Not Displaying The Button In v4 #230

padlock98 opened this issue Mar 31, 2020 · 0 comments

Comments

@padlock98
Copy link

Been trying to migrate from react-portal from v2 to v4, due to recent upgrade of React to 16.8.6.

Having problem with Portal, whereby support to load a button on openByClickOn (as shown below), but nothing appears. Is there any breaking changes on the usage of openByClickOn ?

      <Portal ref={c => this.findDialog = c} closeOnEsc openByClickOn={<div className="header-button" style={{background: `#78808B no-repeat center right`}}>FIND TICKET</div>} style={{width: '480px'}}>
        <DialogTitle style={{fontSize: '25px', color: 'black'}}>Find Ticket</DialogTitle>
        <DialogContent>
          <Field name="ticketNo" component={renderField} type="text" label="Ticket No." onKeyUp={() => this.setState({error: ''})}
                 style={{width: '100%'}}/>
          {this.state.error && <p style={{color: '#d50000'}}>{this.state.error}</p>}
        </DialogContent>
        <DialogActions>
          <Button type='button' onClick={handleSubmit(this.find.bind(this))} disabled={pristine || submitting}>Find</Button>
          <Button type='button' onClick={() => this.close()}>Close</Button>
        </DialogActions>
      </Portal>

Expected Result: To show a div button which can be clicked to launch a Dialog box.

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