Skip to content

Commit

Permalink
feat(AnalyticalTable): Refactoring, add onRowExpandChange and placeho…
Browse files Browse the repository at this point in the history
…lder loading (#207)

BREAKING CHANGE: Removed unused prop `cellHeight`, use `rowHeight` instead
BREAKING CHANGE: Removed unused prop `reactTableProps`
BREAKING CHANGE: Removed unused prop `getTableProps`
BREAKING CHANGE: Removed unused prop `getHeaderGroupsProps`
BREAKING CHANGE: Removed unused prop `getHeaderProps`
BREAKING CHANGE: Removed unused prop `getRowProps`
BREAKING CHANGE: Removed unused prop `getCellProps`
  • Loading branch information
MarcusNotheis authored Oct 28, 2019
1 parent fe50a43 commit 2ae4bf6
Show file tree
Hide file tree
Showing 25 changed files with 1,269 additions and 239 deletions.
1 change: 1 addition & 0 deletions packages/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@ui5/webcomponents": "1.0.0-rc.4",
"@ui5/webcomponents-react-base": "0.6.0",
"lodash.debounce": "^4.0.8",
"react-content-loader": "^4.3.2",
"react-table": "7.0.0-beta.12",
"react-toastify": "^5.0.1",
"react-window": "^1.8.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,20 @@ describe('AnalyticalTable', () => {

expect(wrapper.render()).toMatchSnapshot();
});

test('Loading - Placeholder', () => {
const wrapper = mountThemedComponent(
<AnalyticalTable title="Table Title" data={[]} columns={columns} loading visibleRows={15} minRows={5} />
);

expect(wrapper.render()).toMatchSnapshot();
});

test('Loading - Loader', () => {
const wrapper = mountThemedComponent(
<AnalyticalTable title="Table Title" data={data} columns={columns} loading visibleRows={15} minRows={5} />
);

expect(wrapper.render()).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,7 @@ const styles = ({ parameters }: JSSTheme) => ({
}
},

propRowHeight: {
'&$tableContainer': {
height: (props) => `calc(100% - ${props.rowHeight}px)`
},
'& $tableHeaderRow': {
height: (theme) => (theme.contentDensity === 'Compact' ? '2rem' : '2.75rem')
},
'& $th': {
height: (theme) => (theme.contentDensity === 'Compact' ? '2rem' : '2.75rem')
},
modifiedRowHeight: {
'& $tableCell': {
height: (props) => `${props.rowHeight}px`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Icon } from '@ui5/webcomponents-react/lib/Icon';
import React, { CSSProperties, FC, ReactNode, ReactNodeArray, useMemo } from 'react';
import { createUseStyles } from 'react-jss';
import { JSSTheme } from '../../../interfaces/JSSTheme';
import { Resizer } from '../Resizer';
import { Resizer } from './Resizer';
import { ColumnType } from '../types/ColumnType';
import { ColumnHeaderModal } from './ColumnHeaderModal';
import '@ui5/webcomponents/dist/icons/filter';
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2ae4bf6

Please sign in to comment.