fix more styling

This commit is contained in:
Faris Ansari 2017-10-29 18:14:58 +05:30
parent 1b6f749edd
commit ce45c03ff6
5 changed files with 41 additions and 13 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -24,6 +24,7 @@ export default class DataManager {
if (this.options.addSerialNoColumn && !this._serialNoColumnAdded) { if (this.options.addSerialNoColumn && !this._serialNoColumnAdded) {
const val = { const val = {
content: 'Sr. No', content: 'Sr. No',
editable: false,
resizable: false resizable: false
}; };
@ -34,6 +35,7 @@ export default class DataManager {
if (this.options.addCheckboxColumn && !this._checkboxColumnAdded) { if (this.options.addCheckboxColumn && !this._checkboxColumnAdded) {
const val = { const val = {
content: '<input type="checkbox" />', content: '<input type="checkbox" />',
editable: false,
resizable: false resizable: false
}; };

View File

@ -22,7 +22,8 @@ const DEFAULT_OPTIONS = {
addSerialNoColumn: true, addSerialNoColumn: true,
addCheckboxColumn: true, addCheckboxColumn: true,
enableClusterize: true, enableClusterize: true,
enableLogs: false enableLogs: false,
takeAvailableSpace: false
}; };
export default class DataTable { export default class DataTable {
@ -218,10 +219,15 @@ export default class DataTable {
setDimensions() { setDimensions() {
const self = this; const self = this;
// setting width as 0 will ensure that the if (!this.options.takeAvailableSpace) {
// header doesn't take the available space // setting width as 0 will ensure that the
// header doesn't take the available space
this.header.css({
width: 0
});
}
this.header.css({ this.header.css({
width: 0,
margin: 0 margin: 0
}); });
@ -634,7 +640,7 @@ export default class DataTable {
setBodyWidth() { setBodyWidth() {
this.bodyScrollable.css( this.bodyScrollable.css(
'width', 'width',
parseInt(this.header.css('width'), 10) + 1 parseInt(this.header.css('width'), 10)
); );
} }

View File

@ -1,9 +1,21 @@
@import "~bootstrap/scss/functions"; @import "~bootstrap/scss/functions";
@import "~bootstrap/scss/mixins"; @import "~bootstrap/scss/mixins";
@import "~bootstrap/scss/variables"; @import "~bootstrap/scss/variables";
@import "~bootstrap/scss/reboot"; // @import "~bootstrap/scss/reboot";
@import "~bootstrap/scss/tables"; @import "~bootstrap/scss/tables";
*, *::after, *::before {
box-sizing: border-box;
}
button, input {
overflow: visible;
font-family: inherit;
font-size: inherit;
line-height: inherit;
margin: 0;
}
.data-table * { .data-table * {
outline: none; outline: none;
} }