Skip to content

Commit

Permalink
#6642 Matrix wrong paddings. - drag indicator position
Browse files Browse the repository at this point in the history
Fixes #6642
  • Loading branch information
novikov82 committed Aug 12, 2023
1 parent 37fdff8 commit 0cbdcfe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/defaultCss/defaultV2Css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ export var defaultV2Css = {
detailIconId: "icon-expanddetail",
detailIconExpandedId: "icon-collapsedetail",
actionsCell: "sd-table__cell sd-table__cell--actions",
actionsCellDrag: "sd-table__cell--drag",
emptyCell: "sd-table__cell--empty",
verticalCell: "sd-table__cell--vertical",
cellQuestionWrapper: "sd-table__question-wrapper",
Expand Down Expand Up @@ -456,6 +457,7 @@ export var defaultV2Css = {
detailIconExpandedId: "icon-collapsedetail",
detailPanelCell: "sd-table__cell--detail-panel",
actionsCell: "sd-table__cell sd-table__cell--actions",
actionsCellDrag: "sd-table__cell--drag",
buttonAdd: "sd-matrixdynamic__add-btn",
buttonRemove: "sd-action--negative sd-matrixdynamic__remove-btn",
iconAdd: "",
Expand Down
2 changes: 1 addition & 1 deletion src/defaultV2-theme/blocks/sd-table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
}
}

.sd-table__cell--actions:not(.sd-table__cell--vertical) {
.sd-table__cell--actions:not(.sd-table__cell--vertical):not(.sd-table__cell--drag) {
width: 0;
&:first-of-type {
padding-left: 0;
Expand Down
6 changes: 3 additions & 3 deletions src/question_matrixdropdownrendered.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,12 @@ export class QuestionMatrixDropdownRenderedTable extends Base {
private getRowDragCell(rowIndex: number) {
const cell = new QuestionMatrixDropdownRenderedCell();
cell.isDragHandlerCell = true;
cell.className = this.getActionsCellClassName();
cell.className = this.getActionsCellClassName(cell);
cell.row = this.matrix.visibleRows[rowIndex];
return cell;
}
private getActionsCellClassName() :string {
return new CssClassBuilder().append(this.cssClasses.actionsCell).append(this.cssClasses.verticalCell, !this.matrix.isColumnLayoutHorizontal).toString();
private getActionsCellClassName(cell: QuestionMatrixDropdownRenderedCell = null): string {
return new CssClassBuilder().append(this.cssClasses.actionsCell).append(this.cssClasses.actionsCellDrag, cell?.isDragHandlerCell).append(this.cssClasses.verticalCell, !this.matrix.isColumnLayoutHorizontal).toString();
}
private getRowActionsCell(rowIndex: number, location: "start" | "end") {
const rowActions = this.getRowActions(rowIndex, location);
Expand Down

0 comments on commit 0cbdcfe

Please sign in to comment.