Skip to content

Commit

Permalink
取消scrollview的组件的依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
bplok20010 committed Feb 14, 2019
1 parent 4c9723d commit 4af16f8
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
<body style="background:#F5F5F5">
<div class="demo" id="demo">
</div>
<script src="static\js\vendors.54ed405d.chunk.js"></script><script src="static\js\index.1a730766.js"></script></body>
<script src="static\js\vendors.54ed405d.chunk.js"></script><script src="static\js\index.2f40ff67.js"></script></body>

</html>
1 change: 0 additions & 1 deletion docs/static/js/index.1a730766.js.map

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/static/js/index.2f40ff67.js.map

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions examples/demos/demo1.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ export default class DEMO extends Component {
height: 400,
}}
autoFocus
renderHeader={() => <h3>header</h3>}
renderFooter={() => <h3>footer</h3>}
headerStyle={{
borderBottom: '1px solid #ccc'
}}
footerStyle={{
borderTop: '1px solid #ccc'
}}
value={this.state.value}
onChange={this.handleChange}
items={dataset.filter((item, i) => item.label.indexOf(this.filterMsg) >= 0)}
Expand Down
6 changes: 6 additions & 0 deletions src/ListBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default class ListBox extends React.Component {
static propTypes = {
className: PropTypes.string,
style: PropTypes.object,
headerStyle: PropTypes.object,
footerStyle: PropTypes.object,
scrollViewBodyStyle: PropTypes.object,
prefixCls: PropTypes.string,
valueField: PropTypes.string,
Expand Down Expand Up @@ -453,6 +455,8 @@ export default class ListBox extends React.Component {
footerWrapperComponent: FooterWrapperComponent,
renderHeader,
renderFooter,
headerStyle = {},
footerStyle = {},
} = this.props;

if (width) {
Expand Down Expand Up @@ -485,6 +489,7 @@ export default class ListBox extends React.Component {
renderHeader ?
<HeaderWrapperComponent
className={`${prefixCls}-header`}
style={headerStyle}
>
{renderHeader()}
</HeaderWrapperComponent> :
Expand All @@ -501,6 +506,7 @@ export default class ListBox extends React.Component {
renderFooter ?
<FooterWrapperComponent
className={`${prefixCls}-footer`}
style={footerStyle}
>
{renderFooter()}
</FooterWrapperComponent> :
Expand Down

0 comments on commit 4af16f8

Please sign in to comment.