don't briefly show previous modal contents

ref #248
This commit is contained in:
Collin Barrett 2018-02-17 20:06:08 -06:00
parent 6af1bfab56
commit 0d07ba1a1e

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() {