Skip to content

Commit

Permalink
fixed react types
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kurmanov committed May 18, 2023
1 parent d9bc961 commit 8e99ed0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/react/dropdown-base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class SurveyQuestionDropdownBase<T extends Question> extends SurveyQuesti
aria-label={this.question.ariaLabel}
aria-invalid={this.question.ariaInvalid}
aria-describedby={this.question.ariaDescribedBy}
aria-expanded={this.question.ariaExpanded === null ? null : this.question.ariaExpanded === "true"}
aria-expanded={this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true"}
aria-controls={dropdownListModel.listElementId}
aria-activedescendant={dropdownListModel.ariaActivedescendant}
>
Expand All @@ -116,7 +116,7 @@ export class SurveyQuestionDropdownBase<T extends Question> extends SurveyQuesti
className={this.question.cssClasses.filterStringInput}
role={dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined}
aria-label={this.question.placeholder}
aria-expanded={this.question.ariaExpanded === null ? null : this.question.ariaExpanded === "true"}
aria-expanded={this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true"}
aria-controls={dropdownListModel.listElementId}
aria-activedescendant={dropdownListModel.ariaActivedescendant}
placeholder={dropdownListModel.placeholderRendered}
Expand Down
4 changes: 2 additions & 2 deletions src/react/reactquestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class SurveyQuestion extends SurveyElementBase<any, any> {
aria-required={this.question.ariaRequired}
aria-invalid={this.question.ariaInvalid}
aria-labelledby={question.ariaLabelledBy}
aria-expanded={question.ariaExpanded === null ? null : question.ariaExpanded === "true"}
aria-expanded={question.ariaExpanded === null ? undefined : question.ariaExpanded === "true"}
>
{errorsAboveQuestion}
{headerTop}
Expand Down Expand Up @@ -279,7 +279,7 @@ export class SurveyElementErrors extends ReactSurveyElement {
this.tooltipManager = undefined;
}
protected renderElement(): JSX.Element {
const errors:Array<JSX.Element> = [];
const errors: Array<JSX.Element> = [];
for (let i = 0; i < this.element.errors.length; i++) {
const key: string = "error" + i;
errors.push(
Expand Down
4 changes: 2 additions & 2 deletions src/react/reactquestion_tagbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class SurveyQuestionTagbox extends SurveyQuestionDropdownBase<QuestionTag
<div
id={this.question.inputId}
className={this.question.getControlClass()}
tabIndex={ dropdownListModel.inputReadOnly ? undefined : 0}
tabIndex={dropdownListModel.inputReadOnly ? undefined : 0}
onClick={this.click}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Expand All @@ -41,7 +41,7 @@ export class SurveyQuestionTagbox extends SurveyQuestionDropdownBase<QuestionTag
aria-label={this.question.ariaLabel}
aria-invalid={this.question.ariaInvalid}
aria-describedby={this.question.ariaDescribedBy}
aria-expanded={this.question.ariaExpanded === null ? null : this.question.ariaExpanded === "true"}
aria-expanded={this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true"}
aria-controls={dropdownListModel.listElementId}
aria-activedescendant={dropdownListModel.ariaActivedescendant}
>
Expand Down
2 changes: 1 addition & 1 deletion src/react/tagbox-filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class TagboxFilterString extends SurveyElementBase<ITagboxFilterProps, an
size={!this.model.inputStringRendered ? 1 : undefined}
role={this.model.filterStringEnabled ? this.question.ariaRole : undefined}
aria-label={this.question.placeholder}
aria-expanded={this.question.ariaExpanded === null ? null : this.question.ariaExpanded === "true"}
aria-expanded={this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true"}
aria-controls={this.model.listElementId}
aria-activedescendant={this.model.ariaActivedescendant}
placeholder={this.model.filterStringPlaceholder}
Expand Down

0 comments on commit 8e99ed0

Please sign in to comment.