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): add components for the Grid plugin #553

Merged
merged 8 commits into from
Dec 7, 2017
Merged

feat(react-grid): add components for the Grid plugin #553

merged 8 commits into from
Dec 7, 2017

Conversation

MaximKudriavtsev
Copy link
Contributor

No description provided.


Name | Properties | Description
-----|------------|------------
Grid.Root | [GridRootProps](#gridrootprops) | A component that renders tables body.
Copy link
Contributor

Choose a reason for hiding this comment

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

A component that renders tables root layout?

-----|------------|------------
Grid.Root | [GridRootProps](#gridrootprops) | A component that renders tables body.
Grid.Header | [GridHeaderPlaceholderProps](#gridheaderplaceholderprops) | A component that renders tables header.
Grid.Footer | [GridFooterPlaceholderProps](#gridfooterplaceholderprops) | A component that renders tables footer.
Copy link
Contributor

Choose a reason for hiding this comment

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

A component that renders tables footer placeholder.

export const Header = ({ children }) =>
children && <div className="panel-heading" style={{ paddingBottom: '5px' }}>{children}</div>;
export const Header = ({ children, className, ...restProps }) =>
children && <div className={classNames('panel-heading', className)} style={{ paddingBottom: '5px' }} {...restProps}>{children}</div>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we keep existing styles during customization?

Name | Properties | Description
-----|------------|------------
Grid.Root | [GridRootProps](#gridrootprops) | A component that renders the grid root layout.
Grid.Header | [GridHeaderPlaceholderProps](#gridheaderplaceholderprops) | A component that renders the grid header placeholder.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we call a component that used as a default for the headerPlaceholderComponent property as 'Header'?

export const Footer = ({ children }) =>
children && <div className="panel-footer">{children}</div>;
export const Footer = ({ children, className, ...restProps }) =>
!!children &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Why !!?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SergeyAlexeev Because if don't pass children to the FooterPlaceholder my application broken with an exception.

import { setupConsole } from '@devexpress/dx-testing';
import { Header, Footer } from './layout';
import { shallow } from 'enzyme';
import { getClasses, createShallow } from 'material-ui/test-utils';
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary to use shallow and createShallow at the same time?

Copy link
Contributor Author

@MaximKudriavtsev MaximKudriavtsev Dec 6, 2017

Choose a reason for hiding this comment

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

@SergeyAlexeev Yes, because enzume docs have this note for createShallow(): "can only be called on wrapper of a single node"

-----|------------|------------
Grid.Root | [GridRootProps](#gridrootprops) | A component that renders the grid root layout.

If you specify additional properties, they are added to the component's root element.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd add an empty row here.

@MaximKudriavtsev MaximKudriavtsev merged commit 314f0d8 into DevExpress:master Dec 7, 2017
@MaximKudriavtsev MaximKudriavtsev deleted the Extract-Grid-components branch December 7, 2017 10:59
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.

4 participants