Skip to content

Commit

Permalink
#7185 - fixed simple dinamic matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey Novikov committed Oct 27, 2023
1 parent 5a1d1d2 commit 1743bc7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/defaultCss/defaultV2Css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ export var defaultV2Css = {
row: "sd-table__row",
expandedRow: "sd-table__row--expanded",
rowHasPanel: "sd-table__row--has-panel",
rowHasEndActions: "sd-table__row--has-end-actions",
headerCell: "sd-table__cell sd-table__cell--header",
rowTextCell: "sd-table__cell sd-table__cell--row-text",
columnTitleCell: "sd-table__cell--column-title",
Expand Down Expand Up @@ -470,6 +471,7 @@ export var defaultV2Css = {
cell: "sd-table__cell",
row: "sd-table__row",
rowHasPanel: "sd-table__row--has-panel",
rowHasEndActions: "sd-table__row--has-end-actions",
expandedRow: "sd-table__row--expanded",
itemCell: "sd-table__cell--item",
headerCell: "sd-table__cell sd-table__cell--header",
Expand Down
14 changes: 9 additions & 5 deletions src/defaultV2-theme/blocks/sd-table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@
}

.sd-table:not(.sd-matrix__table) {
tr:not(.sd-table__row--has-panel){
tr:not(.sd-table__row--has-end-actions){
&:not(:last-of-type) {
padding-bottom: calcSize(3);
&::after {
Expand All @@ -488,8 +488,10 @@
}
}

.sd-table-wrapper:last-of-type .sd-table__row:last-of-type .sd-table__cell-action--show-detail-mobile {
margin-bottom: calcSize(-2);
.sd-table-wrapper:last-of-type .sd-table__row:last-of-type {
.sd-table__cell-action--show-detail-mobile, .sd-table__cell-action--remove-row {
margin-bottom: calcSize(-2);
}
}

.sd-matrix__label {
Expand Down Expand Up @@ -550,9 +552,11 @@
.sd-action-bar {
margin-right: calcSize(-3);
margin-left: calcSize(-3);
justify-content: space-between;
background: $background;
}
#show-detail-mobile {
flex-grow: 1;
}
}

.sd-action.sd-action.sd-matrixdynamic__remove-btn {
Expand All @@ -578,7 +582,7 @@
}
.sd-table__row {
padding-bottom: calcSize(2);
&.sd-table__row--has-panel {
&.sd-table__row--has-end-actions {
padding-bottom: calcSize(0);
}

Expand Down
4 changes: 3 additions & 1 deletion src/question_matrixdropdownrendered.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class QuestionMatrixDropdownRenderedRow extends Base {
@property({ defaultValue: false }) isGhostRow: boolean;
@property({ defaultValue: false }) isAdditionalClasses: boolean;
@property({ defaultValue: true }) visible: boolean;
//@property({ defaultValue: true }) visible: boolean;
public hasEndActions: boolean;
public row: MatrixDropdownRowModelBase;
public isErrorsRow = false;
private static counter = 1;
Expand All @@ -165,6 +165,7 @@ export class QuestionMatrixDropdownRenderedRow extends Base {
.append(this.cssClasses.detailRow, this.isDetailRow)
.append(this.cssClasses.rowHasPanel, this.row?.hasPanel)
.append(this.cssClasses.expandedRow, this.row?.isDetailPanelShowing && !this.isDetailRow)
.append(this.cssClasses.rowHasEndActions, this.hasEndActions)
.append(this.cssClasses.ghostRow, this.isGhostRow)
.append(this.cssClasses.rowAdditional, this.isAdditionalClasses)
.toString();
Expand Down Expand Up @@ -750,6 +751,7 @@ export class QuestionMatrixDropdownRenderedTable extends Base {
const actions = this.getRowActionsCell(rowIndex, location, renderedRow.isDetailRow);
if (!!actions) {
renderedRow.cells.push(actions);
renderedRow.hasEndActions = true;
} else {
var cell = new QuestionMatrixDropdownRenderedCell();
cell.isEmpty = true;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1743bc7

Please sign in to comment.