Skip to content

Commit

Permalink
Merge pull request #2988 from dhis2/DHIS2-18129/max-length-to-custom-…
Browse files Browse the repository at this point in the history
…text-inputs

feat: add max length to inputs for title and subtitle
  • Loading branch information
flaminic authored Nov 5, 2024
2 parents 70757b4 + 5fdcc44 commit ba245cb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/config/field-overrides/dataSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,20 @@ class RenderAsTabsSettings extends React.Component {
{state.displayOptions && state.displayOptions.customText &&
<div style={customTextCssStyles}>
<TextField
value={(state.displayOptions && state.displayOptions.customText &&
state.displayOptions.customText.header) || ""}
fullWidth={false}
onChange={this.onCustomTextHeaderChanged}
floatingLabelText={this.translate('data_set_title')}
value={(state.displayOptions && state.displayOptions.customText &&
state.displayOptions.customText.header) || ""}
fullWidth={false}
onChange={this.onCustomTextHeaderChanged}
floatingLabelText={this.translate('data_set_title')}
maxLength={500}
/>
<TextField
value={(state.displayOptions && state.displayOptions.customText &&
state.displayOptions.customText.subheader) || ""}
fullWidth={false}
onChange={this.onCustomTextSubheaderChanged}
floatingLabelText={this.translate('data_set_subtitle')}
maxLength={500}
/>
</div>}
</div>
Expand Down

0 comments on commit ba245cb

Please sign in to comment.