Merge pull request #1460 from automatisch/AUT-493

feat: introduce asterisk for all the required fields
This commit is contained in:
Ali BARIN
2024-03-12 14:23:53 +01:00
committed by GitHub
5 changed files with 8 additions and 5 deletions

View File

@@ -159,6 +159,7 @@ function ChooseAppAndEventSubstep(props) {
<TextField
{...params}
label={formatMessage('flowEditor.chooseApp')}
required
/>
)}
value={getOption(appOptions, step.appKey) || null}
@@ -185,6 +186,7 @@ function ChooseAppAndEventSubstep(props) {
<TextField
{...params}
label={formatMessage('flowEditor.chooseEvent')}
required
InputProps={{
...params.InputProps,
endAdornment: (

View File

@@ -31,7 +31,7 @@ const optionGenerator = (connection) => ({
});
const getOption = (options, connectionId) =>
options.find((connection) => connection.value === connectionId) || null;
options.find((connection) => connection.value === connectionId) || undefined;
function ChooseConnectionSubstep(props) {
const {
@@ -226,6 +226,7 @@ function ChooseConnectionSubstep(props) {
label={formatMessage(
'chooseConnectionSubstep.chooseConnection',
)}
required
/>
)}
value={getOption(connectionOptions, connection?.id)}

View File

@@ -183,7 +183,7 @@ function ControlledCustomAutocomplete(props) {
variant="outlined"
sx={{ bgcolor: 'white', display: 'inline-block', px: 0.75 }}
>
{label}
{`${label}${required ? ' *' : ''}`}
</InputLabel>
</InputLabelWrapper>

View File

@@ -63,7 +63,7 @@ export default function InputCreator(props) {
disablePortal
disableClearable={required}
options={preparedOptions}
renderInput={(params) => <MuiTextField {...params} label={label} />}
renderInput={(params) => <MuiTextField {...params} label={label} required={required}/>}
defaultValue={value}
description={description}
loading={loading}
@@ -83,13 +83,13 @@ export default function InputCreator(props) {
disablePortal
disableClearable={required}
options={preparedOptions}
renderInput={(params) => <MuiTextField {...params} label={label} />}
defaultValue={value}
description={description}
loading={loading}
disabled={disabled}
showOptionValue={showOptionValue}
shouldUnregister={shouldUnregister}
required={required}
/>
)}

View File

@@ -98,7 +98,7 @@ const PowerInput = (props) => {
variant="outlined"
sx={{ bgcolor: 'white', display: 'inline-block', px: 0.75 }}
>
{label}
{`${label}${required ? ' *' : ''}`}
</InputLabel>
</InputLabelWrapper>