From e5716f35b80d53ad29e40b41275af78388185932 Mon Sep 17 00:00:00 2001 From: tsv2013 Date: Fri, 10 Jan 2025 12:47:29 +0300 Subject: [PATCH] survey.onAfterRenderQuestionInput is not fired in React (#9288) Fixes #9262 Co-authored-by: tsv2013 --- packages/survey-react-ui/src/dropdown-base.tsx | 4 +++- packages/survey-react-ui/src/reactquestion_tagbox.tsx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/survey-react-ui/src/dropdown-base.tsx b/packages/survey-react-ui/src/dropdown-base.tsx index 9a1108cb2b..5c4caf2f14 100644 --- a/packages/survey-react-ui/src/dropdown-base.tsx +++ b/packages/survey-react-ui/src/dropdown-base.tsx @@ -51,7 +51,8 @@ export class SurveyQuestionDropdownBase extends SurveyQuesti aria-labelledby={this.question.a11y_input_ariaLabelledBy} aria-describedby={this.question.a11y_input_ariaDescribedBy} tabIndex={this.question.isDisabledAttr ? undefined : 0} - className={this.question.getControlClass()}> + className={this.question.getControlClass()} + ref={(div) => (this.setControl(div))}> {text} {this.renderReadOnlyElement()} ; @@ -107,6 +108,7 @@ export class SurveyQuestionDropdownBase extends SurveyQuesti aria-expanded={this.question.ariaExpanded} aria-controls={dropdownListModel.listElementId} aria-activedescendant={dropdownListModel.ariaActivedescendant} + ref={(div) => (this.setControl(div))} > {dropdownListModel.showHintPrefix ? (
diff --git a/packages/survey-react-ui/src/reactquestion_tagbox.tsx b/packages/survey-react-ui/src/reactquestion_tagbox.tsx index cc69adf049..2af01f8c82 100644 --- a/packages/survey-react-ui/src/reactquestion_tagbox.tsx +++ b/packages/survey-react-ui/src/reactquestion_tagbox.tsx @@ -43,6 +43,7 @@ export class SurveyQuestionTagbox extends SurveyQuestionDropdownBase (this.setControl(div))} >
{items}