-
Notifications
You must be signed in to change notification settings - Fork 380
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
feat(react-grid): add components for the Grid plugin #553
Conversation
|
||
Name | Properties | Description | ||
-----|------------|------------ | ||
Grid.Root | [GridRootProps](#gridrootprops) | A component that renders tables body. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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>; |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why !!
?
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
No description provided.