Skip to content

Commit

Permalink
Add few comments
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Mar 26, 2024
1 parent 153b0e7 commit 6972f0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export function TextField(props: TextFieldProps) {
compressed={false}
value={field.value || getInitialValue(props.field.type)}
onChange={(e) => form.setFieldValue(formField, e.target.value)}
// This is a design decision to only trigger form updates onBlur() instead
// of onChange(). This is to rate limit the number of updates & re-renders made, as users
// typically rapidly type things into a text box, which would consequently trigger
// onChange() much more often.
onBlur={() => props.onFormChange()}
/>
</EuiFormRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
});

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

0 comments on commit 6972f0b

Please sign in to comment.