Skip to content

Commit

Permalink
#7890 Multi-Select Matrix: alternateRows applies incorrectly to a c…
Browse files Browse the repository at this point in the history
…olumn with `showInMultipleColumns: true`

Fixes #7890
  • Loading branch information
novikov82 committed Feb 22, 2024
1 parent b8569f8 commit 9eb82e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/question_matrixdropdownrendered.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,7 @@ export class QuestionMatrixDropdownRenderedTable extends Base {
}
private setItemCellCssClasses(cell: QuestionMatrixDropdownRenderedCell) {
cell.className = new CssClassBuilder()
.append(this.cssClasses.cell)
.append(this.cssClasses.itemCell)
.append(this.cssClasses.radioCell, cell.isRadio)
.append(this.cssClasses.checkboxCell, cell.isCheckbox)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<td class="sd-table__cell sd-table__cell--row-text" colspan="1" data-responsive-title="row1" title="">
<span class="sv-string-viewer">row1</span>
</td>
<td class="sd-table__cell--item" colspan="1" data-responsive-title="Item 1" title="Item 1">
<td class="sd-table__cell sd-table__cell--item" colspan="1" data-responsive-title="Item 1" title="Item 1">
<div class="sd-table__question-wrapper">
<div class="sd-item sd-item--allowhover sd-radio sd-radio--allowhover sd-selectbase__item sd-selectbase__item--inline" role="presentation">
<label class="sd-selectbase__label">
Expand All @@ -31,7 +31,7 @@
</div>
</div>
</td>
<td class="sd-table__cell--item" colspan="1" data-responsive-title="Item 1" title="Item 1">
<td class="sd-table__cell sd-table__cell--item" colspan="1" data-responsive-title="Item 1" title="Item 1">
<div class="sd-table__question-wrapper">
<div class="sd-checkbox sd-checkbox--allowhover sd-item sd-item--allowhover sd-selectbase__item sd-selectbase__item--inline" role="presentation">
<label class="sd-selectbase__label">
Expand All @@ -46,7 +46,7 @@
</div>
</div>
</td>
<td class="sd-table__cell--item" colspan="1" data-responsive-title="Item 2" title="Item 2">
<td class="sd-table__cell sd-table__cell--item" colspan="1" data-responsive-title="Item 2" title="Item 2">
<div class="sd-table__question-wrapper">
<div class="sd-checkbox sd-checkbox--allowhover sd-item sd-item--allowhover sd-selectbase__item sd-selectbase__item--inline" role="presentation">
<label class="sd-selectbase__label">
Expand Down
4 changes: 2 additions & 2 deletions tests/question_matrixdropdownbasetests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ QUnit.test("Check matrixdropdown cells cssClasses with showInMultipleColumns", f
const matrix = <QuestionMatrixDropdownModelBase>survey.getQuestionByName("matrix");
const renderedTable = matrix.renderedTable;
assert.equal(renderedTable.headerRow.cells[1].className, "custom-header-cell");
assert.equal(renderedTable.rows[1].cells[1].className, "custom-item-cell custom-radio-item-cell");
assert.equal(renderedTable.rows[1].cells[3].className, "custom-item-cell custom-checkbox-item-cell");
assert.equal(renderedTable.rows[1].cells[1].className, "sv_matrix_cell custom-item-cell custom-radio-item-cell");
assert.equal(renderedTable.rows[1].cells[3].className, "sv_matrix_cell custom-item-cell custom-checkbox-item-cell");
});
QUnit.test("Check matrixdropdown cells cssClasses with showInMultipleColumns", function (assert) {
const survey = new SurveyModel({
Expand Down

0 comments on commit 9eb82e9

Please sign in to comment.