diff --git a/src/components/flow/actions/setrunresult/SetRunResultForm.tsx b/src/components/flow/actions/setrunresult/SetRunResultForm.tsx index 0ec1ea37e..129bf5723 100644 --- a/src/components/flow/actions/setrunresult/SetRunResultForm.tsx +++ b/src/components/flow/actions/setrunresult/SetRunResultForm.tsx @@ -112,6 +112,9 @@ export default class SetRunResultForm extends React.PureComponent< } private handleCreateAssetFromInput(input: string): Asset { + // workaround for the lack of a length limit on the form itself + input = input.substring(0, 64); + return { id: snakify(input), name: input, @@ -173,7 +176,7 @@ export default class SetRunResultForm extends React.PureComponent< onChange={this.handleCategoryUpdate} entry={this.state.category} autocomplete={false} - maxLength={128} + maxLength={36} helpText={i18n.t( 'forms.result_category_help', "An optional category for your result. For age, the value might be 17, but the category might be 'Young Adult'" diff --git a/src/components/flow/actions/setrunresult/__snapshots__/SetRunResultForm.test.ts.snap b/src/components/flow/actions/setrunresult/__snapshots__/SetRunResultForm.test.ts.snap index 29a7d3d2f..f6efc7ff2 100644 --- a/src/components/flow/actions/setrunresult/__snapshots__/SetRunResultForm.test.ts.snap +++ b/src/components/flow/actions/setrunresult/__snapshots__/SetRunResultForm.test.ts.snap @@ -94,7 +94,7 @@ exports[`SetRunResultForm render should render 1`] = ` } } helpText="An optional category for your result. For age, the value might be 17, but the category might be 'Young Adult'" - maxLength={128} + maxLength={36} name="Category" onChange={[Function]} placeholder="Optional"