Skip to content

Commit

Permalink
change the position of recordset main spinner
Browse files Browse the repository at this point in the history
to be always vertically centered
  • Loading branch information
RFSH committed Jan 5, 2024
1 parent ff2c9e7 commit bd95c98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/assets/scss/_recordset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,12 @@
}

// when spinner is displayed, we have to adjust the margin-top
.recordset-main-table.with-spinner {
.main-body.with-spinner {
margin-top: variables.$main-spinner-height * -1;
}
.recordset-main-spinner-container {
top: 70px;
// show the tooltip in the middle of the container
top: calc(50% - variables.$main-spinner-height);
}
}
}
10 changes: 5 additions & 5 deletions src/components/recordset/recordset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -785,22 +785,22 @@ const RecordsetInner = ({

const renderMainContainer = () => {
const hasSpinner = errors.length === 0 && (isLoading || forceShowSpinner);
return <div className='main-container dynamic-padding' ref={mainContainer}>
<div className='main-body'>
return (
<div className='main-container dynamic-padding' ref={mainContainer}>
{hasSpinner &&
<div className='recordset-main-spinner-container sticky-spinner-outer-container'>
<ChaiseSpinner className='recordest-main-spinner manual-position-spinner' />
</div>
}
<div className={`recordset-main-table${hasSpinner ? ' with-spinner' : ''}`}>
<div className={`main-body${hasSpinner ? ' with-spinner' : ''}`}>
<RecordsetTable
config={config}
initialSortObject={initialReference.location.sortObject}
/>
</div>
{config.displayMode === RecordsetDisplayMode.FULLSCREEN && <Footer />}
</div>
{config.displayMode === RecordsetDisplayMode.FULLSCREEN && <Footer />}
</div>
)
};

/**
Expand Down

0 comments on commit bd95c98

Please sign in to comment.