Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#6461 Property Grid - Two button links have the focused style at the same time #6481

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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[disabled]="!model.isClickable" [classes]="model.linkSetButtonCssClasses" [title]="model.tooltip" [iconName]="model.iconName">
</svc-action-button>
<ng-container *ngIf="!model.isReadOnly && model.showClear">
<svc-action-button [text]="clearCaption" [click]="model.doClearClick.bind(model)" [selected]="model.isSelected"
<svc-action-button [text]="clearCaption" [click]="model.doClearClick.bind(model)"
[disabled]="false" [classes]="model.linkClearButtonCssClasses">
</svc-action-button>
</ng-container>
Expand Down
1 change: 0 additions & 1 deletion packages/survey-creator-react/src/QuestionLinkValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export class SurveyQuestionLinkValue extends SurveyQuestionElementBase {
<ActionButton
classes={this.question.linkClearButtonCssClasses}
click={() => this.question.doClearClick()}
selected={this.question.isSelected}
text={editorLocalization.getString("pe.clear")}
></ActionButton>
);
Expand Down
1 change: 0 additions & 1 deletion packages/survey-creator-vue/src/questions/LinkValue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
v-if="!question.isReadOnly && question.showClear"
:text="clearCaption"
:click="question.doClearClick.bind(question)"
:selected="question.isSelected"
:disabled="false"
:classes="question.linkClearButtonCssClasses"
>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions visualRegressionTests/tests/designer/pg-data-action-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,35 @@ test("Check states", async (t) => {
await takeElementScreenshot("action-clear-button-hovered.png", clearButtonElement, t, comparer);
});
});

test("Default value clear button", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1920, 870);

const generalTab = Selector("h4").withExactText("General");
const dataTab = Selector("h4").withExactText("Data");
await setJSON({
"pages": [
{
"name": "page1",
"elements": [
{
"type": "text",
"name": "question1",
"defaultValue": "text"
}
]
}
]
});

await t
.click(Selector(".svc-question__content"))
.click(generalTab)
.click(dataTab)
.click(Selector(".svc-action-button.svc-question-link__set-button").withText("Change Default Answer"));
const buttons = Selector(".spg-link");
await takeElementScreenshot("action-buttons-on-popup-open.png", buttons, t, comparer);
});
});