Skip to content

Commit

Permalink
repositioned loader on table (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
lghiur authored Aug 4, 2020
1 parent 7311a53 commit 88a1cb5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/tyk-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/tyk-ui.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tyk-technologies/tyk-ui",
"version": "1.1.91",
"version": "1.1.92",
"description": "Tyk UI - ui reusable components",
"main": "lib/index.js",
"scripts": {
Expand Down
8 changes: 6 additions & 2 deletions src/components/Table/js/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const Table = ({
setOnChangeMsg('api');
}, [state]);

if (!state || loading) {
if (!state) {
return <Loader position="absolute" />;
}

Expand All @@ -105,9 +105,13 @@ const Table = ({
</table>
);


return (
<tableContext.Provider value={{ state, sendMessage }}>
<div className={`scrollable ${state.styling?.className || ''}`} style={{ height: state.maxHeight ? state.maxHeight : 'auto' }}>
<div className={`scrollable ${state.styling?.className || ''}`} style={{ height: state.maxHeight ? state.maxHeight : 'auto', position: 'relative' }}>
{
loading && <Loader position="absolute" withbackground />
}
{
infiniteScrolling && state.pagination
? (
Expand Down
2 changes: 1 addition & 1 deletion tyk-ui-styleguide

0 comments on commit 88a1cb5

Please sign in to comment.