user8797729
user8797729

Reputation:

Re-render the component when dialog closed

                    <button className='plus' onClick={async () => {
                        await CustomDialog(<ServiceDetailsDialog />, {
                            title: 'Add Service Details',
                            showCloseIcon: true,
                        })
                    }}>&#43;</button>

How can I make the component rerenders to update data when this dialog closed?

Upvotes: 0

Views: 378

Answers (1)

luisbar
luisbar

Reputation: 778

The CustomDialog must have an onAfterClose or something like that, and in that listener you can invoke forceUpdate

Upvotes: 1

Related Questions