From 0456f82173172292894a2ce68ac7a103453d90b6 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sat, 17 Feb 2018 20:06:08 -0600 Subject: [PATCH] don't briefly show previous modal contents ref #248 --- src/FilterLists.Web/ClientApp/components/ListDetailsModal.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FilterLists.Web/ClientApp/components/ListDetailsModal.tsx b/src/FilterLists.Web/ClientApp/components/ListDetailsModal.tsx index 8f9e47125..7264bb87a 100644 --- a/src/FilterLists.Web/ClientApp/components/ListDetailsModal.tsx +++ b/src/FilterLists.Web/ClientApp/components/ListDetailsModal.tsx @@ -15,13 +15,14 @@ export default class ListDetailsModal extends React.Component { 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) .then(data => { this.setState({ filterListDetails: data, loading: false }); }); + this.setState({ showModal: true }); } handleCloseModal() {