Hi All ,
this is my code in which im using the isRequired ={true} functionality in Select component. but this isRequired is only working for Issue Type, and not for Work Flow and Field/s. I’m importing select from @forge/ui.
return (
<Fragment>
<Fragment>
<Text style={{ fontSize: 10 }}>
Select the Fields which need to be mandated in the Projects.
</Text>
<Form onSubmit={onSubmit} submitButtonText="Create Rule">
<Select
label="Field/s"
name="fields"
isRequired={true}
isMulti={true}
>
{fields.map((field) => (
<Option label={field.name} value={field.id} />
))}
</Select>
<Select
label="Issue Type"
name="issueTypeId"
isRequired={true}
isMulti={false}
>
{issueTypes.map((issueType) => (
<Option label={issueType.name} value={issueType.id} />
))}
</Select>
<Text style={{ fontSize: 10 }}>
Select the workflow state for the selected issue.
</Text>
<Select
label="Work Flow"
name="workflowId"
isRequired={true}
isMulti={true}
>
{workflowData.map((workflowState) => (
<Option label={workflowState.name} value={workflowState.id} />
))}
</Select>
</Form>
</Fragment>
<Fragment>
{Object.keys(rules.mandateRule).length ? (
<RulesTable rules={rules} />
) : (
<Text>No Rules Created!</Text>
)}
</Fragment>
{isInvalidWorkflowDialogOpen && (
<ModalDialog
header="Invalid Workflow"
onClose={closeInvalidWorkflowDialog}
appearance="danger"
>
<Text>
The valid workflow for <Strong>" {selectedIssueTypeName} "</Strong>
issueType are :
</Text>
<Text>" {invalidWorkflowName} ".</Text>
<Text>Please select a valid workflow.</Text>
</ModalDialog>
)}
</Fragment>
);
};
export default FieldsConfig;
Regards
Rishabh Kumar