Don't render table options modal content when it's closed
This commit is contained in:
parent
82b35f095e
commit
439870a546
|
@ -131,6 +131,8 @@ class TableOptionsModal extends Component {
|
|||
isOpen={isOpen}
|
||||
onModalClose={onModalClose}
|
||||
>
|
||||
{
|
||||
isOpen ?
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
Table Options
|
||||
|
@ -139,7 +141,7 @@ class TableOptionsModal extends Component {
|
|||
<ModalBody>
|
||||
<Form>
|
||||
{
|
||||
hasPageSize &&
|
||||
hasPageSize ?
|
||||
<FormGroup>
|
||||
<FormLabel>Page Size</FormLabel>
|
||||
|
||||
|
@ -151,18 +153,19 @@ class TableOptionsModal extends Component {
|
|||
errors={pageSizeError ? [{ message: pageSizeError }] : undefined}
|
||||
onChange={this.onPageSizeChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
</FormGroup> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
!!OptionsComponent &&
|
||||
OptionsComponent ?
|
||||
<OptionsComponent
|
||||
onTableOptionChange={onTableOptionChange}
|
||||
/>
|
||||
/> : null
|
||||
}
|
||||
|
||||
{
|
||||
canModifyColumns &&
|
||||
canModifyColumns ?
|
||||
<FormGroup>
|
||||
<FormLabel>Columns</FormLabel>
|
||||
|
||||
|
@ -218,7 +221,8 @@ class TableOptionsModal extends Component {
|
|||
<TableOptionsColumnDragPreview />
|
||||
</div>
|
||||
</div>
|
||||
</FormGroup>
|
||||
</FormGroup> :
|
||||
null
|
||||
}
|
||||
</Form>
|
||||
</ModalBody>
|
||||
|
@ -229,7 +233,9 @@ class TableOptionsModal extends Component {
|
|||
Close
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</ModalContent>
|
||||
</ModalContent> :
|
||||
null
|
||||
}
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue