Skip to content

Commit

Permalink
Merge pull request #2871 from andrewbaldwin44/task/select-input-size
Browse files Browse the repository at this point in the history
Webui Allow changing select input size
  • Loading branch information
cyberw authored Aug 26, 2024
2 parents 4d050be + e6d9635 commit afc36c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion locust/webui/src/components/Form/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ export default function Select({
options,
multiple = false,
defaultValue,
size = 'medium',
sx,
...inputProps
}: ISelect) {
return (
<FormControl sx={sx}>
<FormControl size={size} sx={sx}>
<InputLabel htmlFor={name} shrink>
{label}
</InputLabel>
Expand Down
2 changes: 1 addition & 1 deletion locust/webui/src/components/LineChart/LineChart.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const createOptions = <ChartType extends Pick<ICharts, 'time'>>({
},
xAxis: {
type: 'time',
startValue: charts.time[0],
startValue: (charts.time || [''])[0],
axisLabel: {
formatter: formatTimeAxis,
},
Expand Down
2 changes: 1 addition & 1 deletion locust/webui/src/redux/slice/ui.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const uiSlice = createSlice({
...addSpaceToChartsBetweenTests(state.charts as ICharts),
markers: (state.charts as ICharts).markers
? [...((state.charts as ICharts).markers as string[]), payload]
: [state.charts.time[0], payload],
: [(state.charts.time || [''])[0], payload],
},
};
},
Expand Down

0 comments on commit afc36c7

Please sign in to comment.