Skip to content

Commit 6972f0b

Browse files
committed
Add few comments
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
1 parent 153b0e7 commit 6972f0b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

public/pages/workflow_detail/component_details/input_fields/text_field.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ export function TextField(props: TextFieldProps) {
4848
compressed={false}
4949
value={field.value || getInitialValue(props.field.type)}
5050
onChange={(e) => form.setFieldValue(formField, e.target.value)}
51+
// This is a design decision to only trigger form updates onBlur() instead
52+
// of onChange(). This is to rate limit the number of updates & re-renders made, as users
53+
// typically rapidly type things into a text box, which would consequently trigger
54+
// onChange() much more often.
5155
onBlur={() => props.onFormChange()}
5256
/>
5357
</EuiFormRow>

public/pages/workflow_detail/workspace/resizable_workspace.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
102102
});
103103

104104
// Hook to update the workflow's flow state, if applicable. It may not exist if
105-
// it is a backend-only-created workflow, or a new, unsaved workflow
105+
// it is a backend-only-created workflow, or a new, unsaved workflow. If so,
106+
// generate a default one based on the 'workflows' JSON field.
106107
useEffect(() => {
107108
const workflowCopy = { ...props.workflow } as Workflow;
108109
if (workflowCopy) {

0 commit comments

Comments
 (0)