Skip to content

Commit

Permalink
Field title fixes (#1549)
Browse files Browse the repository at this point in the history
* fix dropdown title

* fix datetime label width

* fix datetime width

* update snaps
  • Loading branch information
VargaJoe authored Oct 16, 2023
1 parent 9a6c73a commit 83d13f1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/sn-controls-react/src/fieldcontrols/date-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const DatePicker: React.FC<ReactClientFieldSetting<DateTimeFieldSetting>>
<>
{settings.DateTimeMode === DateTimeMode.Date ? (
<MUIDatePicker
style={{ display: 'inherit' }}
value={value}
minDate={minDatePickerDate}
onChange={handleDateChange}
Expand All @@ -101,6 +102,7 @@ export const DatePicker: React.FC<ReactClientFieldSetting<DateTimeFieldSetting>>
/>
) : (
<DateTimePicker
style={{ display: 'inherit' }}
minDate={minDatePickerDate}
value={value}
onChange={handleDateChange}
Expand All @@ -111,6 +113,7 @@ export const DatePicker: React.FC<ReactClientFieldSetting<DateTimeFieldSetting>>
InputLabelProps={{ shrink: true }}
required={settings.Compulsory}
format="yyyy MMMM dd hh:mm aaaa"
InputProps={{ readOnly: true, style: { minWidth: '200px' } }}
/>
)}
{!hideDescription && <FormHelperText>{settings.Description}</FormHelperText>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export const DropDownList: React.FC<ReactClientFieldSetting<ChoiceFieldSetting>>
style={{ minWidth: '220px' }}
required={props.settings.Compulsory}
disabled={props.settings.ReadOnly}>
<InputLabel htmlFor={props.settings.Name}>{props.settings.DisplayName}</InputLabel>
<InputLabel htmlFor={props.settings.Name} shrink={true}>
{props.settings.DisplayName}
</InputLabel>
<Select
onChange={handleChange}
inputProps={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ exports[`Date/Date time field control in edit/new view should set all the props
"shrink": true,
}
}
InputProps={
Object {
"readOnly": true,
"style": Object {
"minWidth": "200px",
},
}
}
allowKeyboardControl={true}
ampm={true}
disabled={true}
Expand All @@ -48,6 +56,11 @@ exports[`Date/Date time field control in edit/new view should set all the props
orientation="portrait"
required={true}
showTabs={true}
style={
Object {
"display": "inherit",
}
}
value="1912-04-15T02:10:00.000Z"
views={
Array [
Expand Down Expand Up @@ -89,6 +102,11 @@ exports[`Date/Date time field control in edit/new view should set all the props
onChange={[Function]}
openTo="date"
required={true}
style={
Object {
"display": "inherit",
}
}
value="1912-04-15T02:10:00.000Z"
views={
Array [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ exports[`Drop down list field control in edit/new view should set all the props
>
<WithStyles(ForwardRef(InputLabel))
htmlFor="VersioningMode"
shrink={true}
>
Versioning Mode For Current Content
</WithStyles(ForwardRef(InputLabel))>
Expand Down

0 comments on commit 83d13f1

Please sign in to comment.