Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@soramitsu/soramitsu-js-ui",
"version": "0.8.5",
"version": "0.8.6",
"private": false,
"publishConfig": {
"registry": "https://nexus.iroha.tech/repository/npm-soramitsu/"
Expand Down
6 changes: 4 additions & 2 deletions src/components/Table/STable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default class STable extends Mixins(SizeMixin) {
*/
@Prop({ default: false, type: Boolean }) readonly highlightCurrentRow!: boolean
/**
* A key of the current row. Can be `string` or `number`
* A key of the row. Can be 'Function(row)', `string` or `number`
*/
@Prop({ type: [Function, String, Number] }) readonly rowKey!: ((row: any) => string | number) | string | number
/**
Expand Down Expand Up @@ -278,7 +278,9 @@ export default class STable extends Mixins(SizeMixin) {
}

handleRowClick (row: any, column: ElTableColumn, event: MouseEvent): void {
this.$emit('row-click', row, column, event)
if (column.type !== 'selection') {
this.$emit('row-click', row, column, event)
}
}

handleRowContextMenu (row: any, column: ElTableColumn, event: MouseEvent): void {
Expand Down
6 changes: 3 additions & 3 deletions src/components/Table/STableColumn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ export default class STableColumn extends Vue {
const size = (this.sTable || {}).size
if (!this.width && this.type === 'selection' && size) {
return !tableBorder ? ({
[Size.SMALL]: '30',
[Size.MEDIUM]: '32',
[Size.BIG]: '36'
[Size.SMALL]: '46',
[Size.MEDIUM]: '48',
[Size.BIG]: '52'
}[size]) : ({
[Size.SMALL]: '42',
[Size.MEDIUM]: '44',
Expand Down
6 changes: 6 additions & 0 deletions src/stories/Table/STable.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const configurable = () => ({
:border="border"
:show-header="showHeader"
:highlight-current-row="highlightCurrentRow"
@row-click="alert('click')"
>
<s-table-column type="selection"></s-table-column>
<s-table-column prop="date" label="Date" width="180"></s-table-column>
Expand Down Expand Up @@ -77,6 +78,11 @@ export const configurable = () => ({
highlightCurrentRow: {
default: boolean('Highlight current row', false)
}
},
methods: {
alert (message: string) {
alert(message)
}
}
})

Expand Down
4 changes: 2 additions & 2 deletions src/styles/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
padding-left: 16px;
padding-right: 16px;
}
.el-table:not(.el-table--border) .el-table-column--selection > .cell {
padding-right: 0;
.el-table:not(.el-table--border) .el-table-column--selection + td > .cell {
padding-left: 0;
}
.el-table--border th:first-child .cell,
.el-table--border td:first-child .cell {
Expand Down