Disable the fields of all CRUD workflow actions on readonly mode (#9939)
Fixes https://discord.com/channels/1130383047699738754/1333822806504247467 In this PR: - Make the workflow step title input readonly when the visualizer is in readonly mode - Make all the fields of the Update Record and Delete Record readonly when the visualizer is in readonly mode - Create stories for the Create Record, Updated Record and Delete Record actions; I'm checking for the default mode and several variants of the disabled mode - Set up mocks for the workflows and use them in msw handlers Follow up: - We use `readonly` and `disabled` alternatively; these are two different states when talking about a HTML `<input />` element. I think we should settle on a single word. - Refactor the `<WorkflowSingleRecordPicker />` component to behave as other selects | Current component | Should look like | |--------|--------| |  |  |
This commit is contained in:
committed by
GitHub
parent
4e32fd1c98
commit
d946cdcba4
@ -27,6 +27,7 @@ type FormMultiSelectFieldInputProps = {
|
||||
VariablePicker?: VariablePickerComponent;
|
||||
readonly?: boolean;
|
||||
placeholder?: string;
|
||||
testId?: string;
|
||||
};
|
||||
|
||||
const StyledDisplayModeReadonlyContainer = styled.div`
|
||||
@ -68,6 +69,7 @@ export const FormMultiSelectFieldInput = ({
|
||||
VariablePicker,
|
||||
readonly,
|
||||
placeholder,
|
||||
testId,
|
||||
}: FormMultiSelectFieldInputProps) => {
|
||||
const inputId = useId();
|
||||
const theme = useTheme();
|
||||
@ -176,7 +178,7 @@ export const FormMultiSelectFieldInput = ({
|
||||
const placeholderText = placeholder ?? label;
|
||||
|
||||
return (
|
||||
<FormFieldInputContainer>
|
||||
<FormFieldInputContainer data-testid={testId}>
|
||||
{label ? <InputLabel>{label}</InputLabel> : null}
|
||||
|
||||
<FormFieldInputRowContainer>
|
||||
|
||||
Reference in New Issue
Block a user