mirror of
https://github.com/ansible/awx.git
synced 2026-03-08 05:01:09 -02:30
Merge pull request #12332 from nixocio/ui_issue_8097
Add typeahed for single choice surveys
This commit is contained in:
@@ -122,7 +122,7 @@ function MultipleChoiceField({ question }) {
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
}}
|
}}
|
||||||
selections={field.value}
|
selections={field.value}
|
||||||
variant={SelectVariant.single}
|
variant={SelectVariant.typeahead}
|
||||||
id={id}
|
id={id}
|
||||||
ouiaId={`single-survey-question-${question.variable}`}
|
ouiaId={`single-survey-question-${question.variable}`}
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ function TagMultiSelect({ onChange, value }) {
|
|||||||
typeAheadAriaLabel={t`Select tags`}
|
typeAheadAriaLabel={t`Select tags`}
|
||||||
noResultsFoundText={t`No results found`}
|
noResultsFoundText={t`No results found`}
|
||||||
ouiaId="tag-multiselect"
|
ouiaId="tag-multiselect"
|
||||||
|
createText={t`Create`}
|
||||||
>
|
>
|
||||||
{renderOptions(options)}
|
{renderOptions(options)}
|
||||||
</Select>
|
</Select>
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ function BecomeMethodField({ fieldOptions, isRequired }) {
|
|||||||
setOptions([...options, { value: option }]);
|
setOptions([...options, { value: option }]);
|
||||||
}}
|
}}
|
||||||
noResultsFoundText={t`No results found`}
|
noResultsFoundText={t`No results found`}
|
||||||
|
createText={t`Create`}
|
||||||
>
|
>
|
||||||
{options.map((option) => (
|
{options.map((option) => (
|
||||||
<SelectOption key={option.value} value={option.value} />
|
<SelectOption key={option.value} value={option.value} />
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ function SurveyListItem({ canEdit, question, isChecked, onSelect, rowIndex }) {
|
|||||||
question.variable
|
question.variable
|
||||||
)}`}
|
)}`}
|
||||||
>
|
>
|
||||||
{question.question_name}
|
<b>{question.question_name}</b>
|
||||||
</Link>
|
</Link>
|
||||||
{question.required && (
|
{question.required && (
|
||||||
<Required
|
<Required
|
||||||
|
|||||||
Reference in New Issue
Block a user