minor fixes
This commit is contained in:
parent
51e077cad3
commit
d9d663d541
@ -621,6 +621,10 @@ var RowManager = function () {
|
|||||||
}, {
|
}, {
|
||||||
key: 'getCheckedRows',
|
key: 'getCheckedRows',
|
||||||
value: function getCheckedRows() {
|
value: function getCheckedRows() {
|
||||||
|
if (!this.checkMap) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
return this.checkMap.map(function (c, rowIndex) {
|
return this.checkMap.map(function (c, rowIndex) {
|
||||||
if (c) {
|
if (c) {
|
||||||
return rowIndex;
|
return rowIndex;
|
||||||
@ -2583,6 +2587,7 @@ var DataManager = function () {
|
|||||||
key: 'prepareNumericColumns',
|
key: 'prepareNumericColumns',
|
||||||
value: function prepareNumericColumns() {
|
value: function prepareNumericColumns() {
|
||||||
var row0 = this.getRow(0);
|
var row0 = this.getRow(0);
|
||||||
|
if (!row0) return;
|
||||||
this.columns = this.columns.map(function (column, i) {
|
this.columns = this.columns.map(function (column, i) {
|
||||||
|
|
||||||
var cellValue = row0[i].content;
|
var cellValue = row0[i].content;
|
||||||
@ -3098,6 +3103,7 @@ var BodyRenderer = function () {
|
|||||||
var rows = this.datamanager.getRows();
|
var rows = this.datamanager.getRows();
|
||||||
|
|
||||||
this.bodyScrollable.innerHTML = '\n <table class="data-table-body">\n ' + getBodyHTML(rows) + '\n </table>\n ';
|
this.bodyScrollable.innerHTML = '\n <table class="data-table-body">\n ' + getBodyHTML(rows) + '\n </table>\n ';
|
||||||
|
this.instance.setDimensions();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: 'renderBodyWithClusterize',
|
key: 'renderBodyWithClusterize',
|
||||||
@ -3289,7 +3295,7 @@ exports.default = {
|
|||||||
freezeMessage: 'Loading...',
|
freezeMessage: 'Loading...',
|
||||||
editing: function editing() {},
|
editing: function editing() {},
|
||||||
addSerialNoColumn: true,
|
addSerialNoColumn: true,
|
||||||
addCheckboxColumn: true,
|
addCheckboxColumn: false,
|
||||||
enableClusterize: true,
|
enableClusterize: true,
|
||||||
enableLogs: false,
|
enableLogs: false,
|
||||||
takeAvailableSpace: false,
|
takeAvailableSpace: false,
|
||||||
@ -3332,12 +3338,12 @@ if(false) {
|
|||||||
/* 15 */
|
/* 15 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
exports = module.exports = __webpack_require__(16)(undefined);
|
exports = module.exports = __webpack_require__(16)(false);
|
||||||
// imports
|
// imports
|
||||||
|
|
||||||
|
|
||||||
// module
|
// module
|
||||||
exports.push([module.i, "/* variables */\n/* resets */\n*, *::after, *::before {\n box-sizing: border-box; }\n\nbutton, input {\n overflow: visible;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n margin: 0; }\n\n/* styling */\n.data-table * {\n outline: none; }\n\n.data-table {\n width: 100%;\n position: relative;\n overflow: auto; }\n .data-table table {\n border-collapse: collapse; }\n .data-table table td {\n padding: 0;\n border: 1px solid #d1d8dd; }\n .data-table thead td {\n border-bottom-width: 2px; }\n .data-table .freeze-container {\n display: flex;\n justify-content: center;\n align-content: center;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: #f5f7fa;\n opacity: 0.5;\n font-size: 2em; }\n .data-table .freeze-container span {\n position: absolute;\n top: 50%;\n transform: translateY(-50%); }\n .data-table .trash-container {\n position: absolute;\n bottom: 0;\n left: 30%;\n right: 30%;\n height: 70px;\n background: palevioletred;\n opacity: 0.5; }\n\n.body-scrollable {\n max-height: 500px;\n overflow: auto;\n border-bottom: 1px solid #d1d8dd; }\n .body-scrollable.row-highlight-all .data-table-row:not(.row-unhighlight) {\n background-color: #f5f7fa; }\n\n.data-table-header {\n position: absolute;\n top: 0;\n left: 0;\n background-color: white;\n font-weight: bold; }\n .data-table-header .content span:not(.column-resizer) {\n cursor: pointer; }\n .data-table-header .column-resizer {\n display: none;\n position: absolute;\n right: 0;\n top: 0;\n width: 4px;\n height: 100%;\n background-color: #5292f7;\n cursor: col-resize; }\n .data-table-header .data-table-dropdown {\n position: absolute;\n right: 10px;\n display: inline-flex;\n vertical-align: top;\n text-align: left; }\n .data-table-header .data-table-dropdown.is-active .data-table-dropdown-list {\n display: block; }\n .data-table-header .data-table-dropdown.is-active .data-table-dropdown-toggle {\n display: block; }\n .data-table-header .data-table-dropdown-toggle {\n display: none;\n background-color: transparent;\n border: none; }\n .data-table-header .data-table-dropdown-list {\n display: none;\n font-weight: normal;\n position: absolute;\n min-width: 8rem;\n top: 100%;\n right: 0;\n z-index: 1;\n background-color: white;\n border-radius: 3px;\n box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);\n padding-bottom: 0.5rem;\n padding-top: 0.5rem; }\n .data-table-header .data-table-dropdown-list > div {\n padding: 5px 10px; }\n .data-table-header .data-table-dropdown-list > div:hover {\n background-color: #f5f7fa; }\n .data-table-header .data-table-col.remove-column {\n background-color: #FD8B8B;\n transition: 300ms background-color ease-in-out; }\n .data-table-header .data-table-col.sortable-chosen {\n background-color: #f5f7fa; }\n\n.data-table-col {\n position: relative; }\n .data-table-col .content {\n padding: 8px;\n border: 2px solid transparent; }\n .data-table-col .content.ellipsis {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden; }\n .data-table-col .edit-cell {\n display: none;\n padding: 8px;\n background: #fff;\n z-index: 1;\n height: 100%; }\n .data-table-col .edit-cell input {\n outline: none;\n width: 100%;\n border: none;\n height: 1em; }\n .data-table-col.selected .content {\n border: 2px solid #5292f7; }\n .data-table-col.editing .content {\n display: none; }\n .data-table-col.editing .edit-cell {\n border: 2px solid #5292f7;\n display: block; }\n .data-table-col.highlight {\n background-color: #f5f7fa; }\n .data-table-col:hover .column-resizer {\n display: inline-block; }\n .data-table-col:hover .data-table-dropdown-toggle {\n display: block; }\n\n.data-table-row.row-highlight {\n background-color: #f5f7fa; }\n\n.noselect {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n\nbody.data-table-resize {\n cursor: col-resize; }\n", ""]);
|
exports.push([module.i, "/* variables */\n/* resets */\n*, *::after, *::before {\n box-sizing: border-box; }\n\nbutton, input {\n overflow: visible;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n margin: 0; }\n\n/* styling */\n.data-table * {\n outline: none; }\n\n.data-table {\n width: 100%;\n position: relative;\n overflow: auto; }\n .data-table table {\n border-collapse: collapse; }\n .data-table table td {\n padding: 0;\n border: 1px solid #d1d8dd; }\n .data-table thead td {\n border-bottom-width: 1px; }\n .data-table .freeze-container {\n display: flex;\n justify-content: center;\n align-content: center;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: #f5f7fa;\n opacity: 0.5;\n font-size: 2em; }\n .data-table .freeze-container span {\n position: absolute;\n top: 50%;\n transform: translateY(-50%); }\n .data-table .trash-container {\n position: absolute;\n bottom: 0;\n left: 30%;\n right: 30%;\n height: 70px;\n background: palevioletred;\n opacity: 0.5; }\n\n.body-scrollable {\n max-height: 500px;\n overflow: auto;\n border-bottom: 1px solid #d1d8dd; }\n .body-scrollable.row-highlight-all .data-table-row:not(.row-unhighlight) {\n background-color: #f5f7fa; }\n\n.data-table-header {\n position: absolute;\n top: 0;\n left: 0;\n background-color: white;\n font-weight: bold; }\n .data-table-header .content span:not(.column-resizer) {\n cursor: pointer; }\n .data-table-header .column-resizer {\n display: none;\n position: absolute;\n right: 0;\n top: 0;\n width: 0.25rem;\n height: 100%;\n background-color: #5292f7;\n cursor: col-resize; }\n .data-table-header .data-table-dropdown {\n position: absolute;\n right: 10px;\n display: inline-flex;\n vertical-align: top;\n text-align: left; }\n .data-table-header .data-table-dropdown.is-active .data-table-dropdown-list {\n display: block; }\n .data-table-header .data-table-dropdown.is-active .data-table-dropdown-toggle {\n display: block; }\n .data-table-header .data-table-dropdown-toggle {\n display: none;\n background-color: transparent;\n border: none; }\n .data-table-header .data-table-dropdown-list {\n display: none;\n font-weight: normal;\n position: absolute;\n min-width: 8rem;\n top: 100%;\n right: 0;\n z-index: 1;\n background-color: white;\n border-radius: 3px;\n box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);\n padding-bottom: 0.5rem;\n padding-top: 0.5rem; }\n .data-table-header .data-table-dropdown-list > div {\n padding: 0.5rem 1rem; }\n .data-table-header .data-table-dropdown-list > div:hover {\n background-color: #f5f7fa; }\n .data-table-header .data-table-col.remove-column {\n background-color: #FD8B8B;\n transition: 300ms background-color ease-in-out; }\n .data-table-header .data-table-col.sortable-chosen {\n background-color: #f5f7fa; }\n\n.data-table-col {\n position: relative; }\n .data-table-col .content {\n padding: 0.25rem;\n border: 2px solid transparent; }\n .data-table-col .content.ellipsis {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden; }\n .data-table-col .edit-cell {\n display: none;\n padding: 0.25rem;\n background: #fff;\n z-index: 1;\n height: 100%; }\n .data-table-col .edit-cell input {\n outline: none;\n width: 100%;\n border: none;\n height: 1em; }\n .data-table-col.selected .content {\n border: 2px solid #5292f7; }\n .data-table-col.editing .content {\n display: none; }\n .data-table-col.editing .edit-cell {\n border: 2px solid #5292f7;\n display: block; }\n .data-table-col.highlight {\n background-color: #f5f7fa; }\n .data-table-col:hover .column-resizer {\n display: inline-block; }\n .data-table-col:hover .data-table-dropdown-toggle {\n display: block; }\n\n.data-table-row.row-highlight {\n background-color: #f5f7fa; }\n\n.noselect {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n\nbody.data-table-resize {\n cursor: col-resize; }\n", ""]);
|
||||||
|
|
||||||
// exports
|
// exports
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -31,6 +31,8 @@ export default class BodyRenderer {
|
|||||||
${getBodyHTML(rows)}
|
${getBodyHTML(rows)}
|
||||||
</table>
|
</table>
|
||||||
`;
|
`;
|
||||||
|
this.instance.setDimensions();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
renderBodyWithClusterize() {
|
renderBodyWithClusterize() {
|
||||||
|
|||||||
@ -69,6 +69,7 @@ export default class DataManager {
|
|||||||
|
|
||||||
prepareNumericColumns() {
|
prepareNumericColumns() {
|
||||||
const row0 = this.getRow(0);
|
const row0 = this.getRow(0);
|
||||||
|
if (!row0) return;
|
||||||
this.columns = this.columns.map((column, i) => {
|
this.columns = this.columns.map((column, i) => {
|
||||||
|
|
||||||
const cellValue = row0[i].content;
|
const cellValue = row0[i].content;
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export default {
|
|||||||
freezeMessage: 'Loading...',
|
freezeMessage: 'Loading...',
|
||||||
editing: () => {},
|
editing: () => {},
|
||||||
addSerialNoColumn: true,
|
addSerialNoColumn: true,
|
||||||
addCheckboxColumn: true,
|
addCheckboxColumn: false,
|
||||||
enableClusterize: true,
|
enableClusterize: true,
|
||||||
enableLogs: false,
|
enableLogs: false,
|
||||||
takeAvailableSpace: false,
|
takeAvailableSpace: false,
|
||||||
|
|||||||
@ -58,6 +58,10 @@ export default class RowManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getCheckedRows() {
|
getCheckedRows() {
|
||||||
|
if (!this.checkMap) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
return this.checkMap
|
return this.checkMap
|
||||||
.map((c, rowIndex) => {
|
.map((c, rowIndex) => {
|
||||||
if (c) {
|
if (c) {
|
||||||
|
|||||||
@ -5,6 +5,10 @@ $primary-color: rgb(82, 146, 247);
|
|||||||
$light-bg: #f5f7fa;
|
$light-bg: #f5f7fa;
|
||||||
$light-red: #FD8B8B;
|
$light-red: #FD8B8B;
|
||||||
|
|
||||||
|
$spacer-1: 0.25rem;
|
||||||
|
$spacer-2: 0.5rem;
|
||||||
|
$spacer-3: 1rem;
|
||||||
|
|
||||||
/* resets */
|
/* resets */
|
||||||
*, *::after, *::before {
|
*, *::after, *::before {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -39,7 +43,7 @@ button, input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
thead td {
|
thead td {
|
||||||
border-bottom-width: 2px;
|
border-bottom-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.freeze-container {
|
.freeze-container {
|
||||||
@ -99,7 +103,7 @@ button, input {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 4px;
|
width: $spacer-1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: $primary-color;
|
background-color: $primary-color;
|
||||||
cursor: col-resize;
|
cursor: col-resize;
|
||||||
@ -141,11 +145,11 @@ button, input {
|
|||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);
|
box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: $spacer-2;
|
||||||
padding-top: 0.5rem;
|
padding-top: $spacer-2;
|
||||||
|
|
||||||
&> div {
|
&> div {
|
||||||
padding: 5px 10px;
|
padding: $spacer-2 $spacer-3;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: $light-bg;
|
background-color: $light-bg;
|
||||||
@ -167,7 +171,7 @@ button, input {
|
|||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 8px;
|
padding: $spacer-1;
|
||||||
border: 2px solid transparent;
|
border: 2px solid transparent;
|
||||||
|
|
||||||
&.ellipsis {
|
&.ellipsis {
|
||||||
@ -180,7 +184,7 @@ button, input {
|
|||||||
.edit-cell {
|
.edit-cell {
|
||||||
display: none;
|
display: none;
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
padding: 8px;
|
padding: $spacer-1;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user