don't briefly show previous modal contents

ref #248
This commit is contained in:
Collin M. Barrett 2018-02-17 20:06:08 -06:00
parent a016d7a334
commit 0456f82173

View file

@ -15,13 +15,14 @@ export default class ListDetailsModal extends React.Component<any, any> {
componentWillReceiveProps(nextProps: any) {
this.listId = nextProps.listId;
this.setState({ filterListDetails: null });
}
handleOpenModal() {
this.setState({ showModal: true });
fetch(`https://api.filterlists.com/v1/lists/${this.listId}`)
.then(response => response.json() as Promise<IFilterListDetailsDto[]>)
.then(data => { this.setState({ filterListDetails: data, loading: false }); });
this.setState({ showModal: true });
}
handleCloseModal() {