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(react-grid): support column virtualization #892

Merged
merged 16 commits into from
Apr 19, 2018
Merged

feat(react-grid): support column virtualization #892

merged 16 commits into from
Apr 19, 2018

Conversation

kvet
Copy link
Contributor

@kvet kvet commented Apr 3, 2018

No description provided.

@kvet kvet requested a review from gsobolev April 3, 2018 13:46
};
});

export const tableGroupRowCellColSpanGetter = getTableCellColSpan => (params) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tableGroupRowCellColSpanGetter Wow!

import * as React from 'react';
import * as PropTypes from 'prop-types';

export class ForwardRef extends React.PureComponent {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component seems weird. Maybe we can rename it to something more definitive.

&& tableRow.row.groupedBy !== tableColumn.column.name;
export const isGroupIndentTableCell = (tableRow, tableColumn, grouping) => {
if (tableRow.type !== TABLE_GROUP_TYPE || tableColumn.type !== TABLE_GROUP_TYPE) return false;
if (tableRow.row.groupedBy === tableColumn.column.name) return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we union this two conditions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can. But the row will be too long. We will need to split it.

@kvet kvet changed the title [wip]feat(react-grid): support column virtualization feat(react-grid): support column virtualization Apr 9, 2018
@@ -57,13 +59,19 @@ export class Table extends React.PureComponent {
<Getter name="tableHeaderRows" value={tableHeaderRows} />
<Getter name="tableBodyRows" computed={tableBodyRowsComputed} />
<Getter name="tableColumns" computed={tableColumnsComputed} />
<Getter name="getTableCellColSpan" value={tableCellColSpanGetter} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This getter is not described in docs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is conceived. I am not sure that it is the final realization of the colSpan API. So, it's better to hide it from docs.

{collapsedGrid.rows.map((visibleRow) => {
if (visibleRow.type === 'stub') {
return (
<tr key={visibleRow.key} style={{ height: `${visibleRow.height}px` }} />
Copy link
Contributor

@SergeyAlexeev SergeyAlexeev Apr 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't use html tags(tr, td) in this package. The same about Sizer. It's built with the div tags and placed in core package.

{cells.map((cell) => {
if (cell.type === 'stub') {
return (
<td
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same here.

@@ -30,3 +29,11 @@ export const tableColumnsWithDetail = (tableColumns, toggleColumnWidth) => [
{ key: TABLE_DETAIL_TYPE, type: TABLE_DETAIL_TYPE, width: toggleColumnWidth },
...tableColumns,
];

export const tableDetailRowCellColSpanGetter = getTableCellColSpan => (params) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this name shorter, e.g. 'tableDetailCellColSpanGetter'?

@kvet kvet requested a review from viterobk April 16, 2018 14:46
@kvet kvet merged commit 67dc486 into DevExpress:master Apr 19, 2018
@kvet kvet deleted the column-virtualization branch April 19, 2018 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants