Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bplok20010 committed Mar 10, 2019
1 parent 163b9ad commit 79ee4c9
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 65 deletions.
2 changes: 0 additions & 2 deletions examples/demos/demo1.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React, { Component } from 'react';
import ListBox from '../../src';

const { ListItem, ListItemGroup } = ListBox

const dataset = [];

var uuid = 100;
Expand Down
6 changes: 1 addition & 5 deletions lib/ListBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,7 @@ function (_React$Component) {

var _this$props7 = this.props,
className = _this$props7.className,
value = _this$props7.value,
prefixCls = _this$props7.prefixCls,
items = _this$props7.items,
width = _this$props7.width,
height = _this$props7.height,
tabIndex = _this$props7.tabIndex,
Expand Down Expand Up @@ -503,9 +501,7 @@ function (_React$Component) {
style.height = height;
}

var classes = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(prefixCls), true), (0, _defineProperty2.default)(_classNames, className, className), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames)); // scrollViewBodyCls={`${prefixCls}-body`}
// scrollViewBodyStyle={scrollViewBodyStyle}

var classes = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(prefixCls), true), (0, _defineProperty2.default)(_classNames, className, className), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
return _react.default.createElement(WrapperComponent, {
ref: this.saveListView,
tabIndex: tabIndex,
Expand Down
9 changes: 0 additions & 9 deletions lib/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ function (_React$Component) {
onDeselect && onDeselect(item, itemDOM);
}
});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "saveItem", function (dom) {
_this.node = dom;
});
return _this;
}

Expand All @@ -81,11 +78,6 @@ function (_React$Component) {
value: function shouldComponentUpdate(nextProps, nextState) {
return !(0, _shallowequal.default)(this.props, nextProps) || !(0, _shallowequal.default)(this.state, nextState);
}
}, {
key: "getItemDOM",
value: function getItemDOM() {
return this.node;
}
}, {
key: "render",
value: function render() {
Expand All @@ -100,7 +92,6 @@ function (_React$Component) {
onMouseLeave = _this$props2.onMouseLeave;
var classes = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(prefixCls), true), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-selected"), selected), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
return _react.default.createElement("div", {
ref: this.saveItem,
className: classes,
onClick: this.handleItemClick,
onMouseEnter: onMouseEnter,
Expand Down
24 changes: 0 additions & 24 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,9 @@ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequ
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ListBox", {
enumerable: true,
get: function get() {
return _ListBox.default;
}
});
Object.defineProperty(exports, "ListItem", {
enumerable: true,
get: function get() {
return _ListItem.default;
}
});
Object.defineProperty(exports, "ListItemGroup", {
enumerable: true,
get: function get() {
return _ListItemGroup.default;
}
});
exports.default = void 0;

var _ListBox = _interopRequireDefault(require("./ListBox"));

var _ListItem = _interopRequireDefault(require("./ListItem"));

var _ListItemGroup = _interopRequireDefault(require("./ListItemGroup"));

_ListBox.default.ListItemGroup = _ListItemGroup.default;
_ListBox.default.ListItem = _ListItem.default;
var _default = _ListBox.default;
exports.default = _default;
5 changes: 0 additions & 5 deletions src/ListBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,7 @@ export default class ListBox extends React.Component {
render() {
const {
className,
value,
prefixCls,
items,
width,
height,
tabIndex,
Expand Down Expand Up @@ -524,9 +522,6 @@ export default class ListBox extends React.Component {
[`${prefixCls}-disabled`]: disabled,
});

// scrollViewBodyCls={`${prefixCls}-body`}
// scrollViewBodyStyle={scrollViewBodyStyle}

return (
<WrapperComponent
ref={this.saveListView}
Expand Down
9 changes: 0 additions & 9 deletions src/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ export default class ListItem extends React.Component {
}
}

saveItem = (dom) => {
this.node = dom;
}

getItemDOM() {
return this.node;
}

render() {
const { prefixCls, disabled, selected, children, onMouseEnter, onMouseLeave } = this.props;
const classes = classNames({
Expand All @@ -63,7 +55,6 @@ export default class ListItem extends React.Component {
});

return <div
ref={this.saveItem}
className={classes}
onClick={this.handleItemClick}
onMouseEnter={onMouseEnter}
Expand Down
11 changes: 0 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
import ListBox from './ListBox';
import ListItem from './ListItem';
import ListItemGroup from './ListItemGroup';

export {
ListBox,
ListItem,
ListItemGroup
}

ListBox.ListItemGroup = ListItemGroup;
ListBox.ListItem = ListItem;

export default ListBox;

0 comments on commit 79ee4c9

Please sign in to comment.