publish 1.3.2
This commit is contained in:
parent
fd24f05025
commit
62df601fbd
|
@ -55,8 +55,8 @@ function newMultiSelect(Table, Checkbox) {
|
|||
var selectList = [];
|
||||
var check = checkedAll ? false : true;
|
||||
data.forEach(function (item) {
|
||||
item.checked = check;
|
||||
if (item.checked) {
|
||||
item._checked = check;
|
||||
if (item._checked) {
|
||||
selectList.push(item);
|
||||
}
|
||||
});
|
||||
|
@ -73,11 +73,11 @@ function newMultiSelect(Table, Checkbox) {
|
|||
var data = _this.state.data;
|
||||
|
||||
var selectList = [];
|
||||
record.checked = record.checked ? false : true;
|
||||
record._checked = record._checked ? false : true;
|
||||
var checkedAll = true;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var item = data[i];
|
||||
if (!item.checked || item.checked == false) {
|
||||
if (!item._checked || item._checked == false) {
|
||||
checkedAll = false;
|
||||
break;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ function newMultiSelect(Table, Checkbox) {
|
|||
checkedAll: checkedAll
|
||||
}));
|
||||
data.forEach(function (da) {
|
||||
if (da.checked) {
|
||||
if (da._checked) {
|
||||
selectList.push(da);
|
||||
}
|
||||
});
|
||||
|
@ -110,13 +110,17 @@ function newMultiSelect(Table, Checkbox) {
|
|||
fixed: "left",
|
||||
width: 50,
|
||||
render: function render(text, record, index) {
|
||||
return _react2["default"].createElement(Checkbox, {
|
||||
var attr = {};
|
||||
console.log("record._disabled---", record._disabled);
|
||||
record._disabled ? attr.disabled = record._disabled : "";
|
||||
return _react2["default"].createElement(Checkbox, _extends({
|
||||
key: index,
|
||||
className: 'table-checkbox',
|
||||
checked: record.checked,
|
||||
className: 'table-checkbox'
|
||||
}, attr, {
|
||||
checked: record._checked,
|
||||
onClick: _this.handleClick,
|
||||
onChange: _this.onCheckboxChange(text, record, index)
|
||||
});
|
||||
}));
|
||||
}
|
||||
}];
|
||||
return _defaultColumns.concat(columns);
|
||||
|
|
|
@ -28,4 +28,7 @@
|
|||
.u-table-filter-column-filter-icon{
|
||||
right: 15px;
|
||||
}
|
||||
.u-table-scroll .u-table-header{
|
||||
margin-right: 15px;
|
||||
}
|
||||
}
|
|
@ -124,6 +124,7 @@ const dataList = [
|
|||
},
|
||||
{
|
||||
index: 2,
|
||||
_checked:true,
|
||||
orderCode:"222",
|
||||
supplierName: "22xxx",
|
||||
type_name: "1223",
|
||||
|
@ -140,6 +141,7 @@ const dataList = [
|
|||
index: 3,
|
||||
orderCode:"222",
|
||||
supplierName: "22xxx",
|
||||
_disabled:true,
|
||||
type_name: "1223",
|
||||
purchasing:'内行2',
|
||||
purchasingGroup:"3223",
|
||||
|
@ -190,6 +192,10 @@ class Demo25 extends Component {
|
|||
return (sum);
|
||||
}
|
||||
|
||||
selectedRow=(record, index)=>{
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
let columns = getCloumns();
|
||||
|
||||
|
@ -202,6 +208,7 @@ class Demo25 extends Component {
|
|||
draggable={true}
|
||||
multiSelect={{type: "checkbox"}}
|
||||
scroll={{x:"130%", y: 100}}
|
||||
selectedRow={this.selectedRow}
|
||||
// scroll={{x:this.getCloumnsScroll(columns), y: 150}}
|
||||
/></div>
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -9698,5 +9698,7 @@ li.rc-time-picker-panel-select-option-disabled:hover {
|
|||
height: 100%; }
|
||||
.demo25 .u-table-filter-column-filter-icon {
|
||||
right: 15px; }
|
||||
.demo25 .u-table-scroll .u-table-header {
|
||||
margin-right: 15px; }
|
||||
|
||||
/*# sourceMappingURL=demo.css.map */
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bee-table",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.2",
|
||||
"description": "Table ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
|
|
@ -43,8 +43,8 @@ export default function newMultiSelect(Table, Checkbox) {
|
|||
let selectList = [];
|
||||
let check = checkedAll?false:true;
|
||||
data.forEach(item => {
|
||||
item.checked = check;
|
||||
if(item.checked){
|
||||
item._checked = check;
|
||||
if(item._checked){
|
||||
selectList.push(item);
|
||||
}
|
||||
});
|
||||
|
@ -61,11 +61,11 @@ export default function newMultiSelect(Table, Checkbox) {
|
|||
onCheckboxChange = (text, record, index) => () => {
|
||||
let {data} = this.state;
|
||||
let selectList = [];
|
||||
record.checked = record.checked?false:true;
|
||||
record._checked = record._checked?false:true;
|
||||
let checkedAll = true;
|
||||
for(let i=0;i<data.length;i++){
|
||||
let item = data[i];
|
||||
if(!item.checked || item.checked == false){
|
||||
if(!item._checked || item._checked == false){
|
||||
checkedAll = false;
|
||||
break;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ export default function newMultiSelect(Table, Checkbox) {
|
|||
checkedAll
|
||||
})
|
||||
data.forEach((da)=>{
|
||||
if(da.checked){
|
||||
if(da._checked){
|
||||
selectList.push(da);
|
||||
}
|
||||
})
|
||||
|
@ -101,10 +101,14 @@ export default function newMultiSelect(Table, Checkbox) {
|
|||
fixed:"left",
|
||||
width: 50,
|
||||
render: (text, record, index) => {
|
||||
let attr = {};
|
||||
console.log("record._disabled---",record._disabled)
|
||||
record._disabled?attr.disabled = record._disabled:"";
|
||||
return <Checkbox
|
||||
key={index}
|
||||
className="table-checkbox"
|
||||
checked={record.checked}
|
||||
{...attr}
|
||||
checked={record._checked}
|
||||
onClick={this.handleClick}
|
||||
onChange={this.onCheckboxChange(text, record, index)}
|
||||
></Checkbox>
|
||||
|
|
Loading…
Reference in New Issue