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

Sidebar dismissable is only updating whenever the visible prop updates #1065

Closed
Divya-Yengampeta opened this issue Oct 23, 2019 · 0 comments
Closed
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@Divya-Yengampeta
Copy link

[x] bug report

Current behavior
It updates the dismissable only when the visible prop is updating.
as per the example code, I have to set staet of visible in on click twice in order to change the value of dismissable in the sidebar.
dismissable={this.state.isDismissable}

Expected behavior
should update the dismissable without needing to change the visible.

Example code
iconsTemplate={() => (<button className='p-sidebar-close p-link' onClick={() => {this.setState({ isDismissable: !this.state.isDismissable, IsSideBarVisible: false }, () => this.setState({ IsSideBarVisible: true })); }}> <TiPin className='p-sidebar-close-icon' style={{ color: this.state.isDismissable ? '#848484' : 'blue' }} /> </button>)}

  • React version. [16.8.6]

  • PrimeReact version: [3.1.9]

  • Browser: [all]

  • Language: [all]

@mertsincan mertsincan self-assigned this Nov 5, 2019
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Nov 5, 2019
@mertsincan mertsincan added this to the 3.3.3 milestone Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants