Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(AnalyticalTable): Add onRowExpandChange prop and placeholder loading #207

Merged
merged 11 commits into from
Oct 28, 2019
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