Skip to content

Commit

Permalink
Fix channel creation (#461)
Browse files Browse the repository at this point in the history
* Fix channel creation

* remove blank line
  • Loading branch information
markdavella authored May 29, 2024
1 parent b269920 commit 6e4731e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions web/src/components/channel_config/ChannelPropertiesEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Controller, useFormContext } from 'react-hook-form';
import useStore from '../../store/index.ts';
import TunarrLogo from '../TunarrLogo.tsx';
import { ImageUploadInput } from '../settings/ImageUploadInput.tsx';
import { NumericFormControllerText } from '../util/TypedController.tsx';
import ChannelEditActions from './ChannelEditActions.tsx';

const DefaultIconPath = '';
Expand Down Expand Up @@ -56,19 +57,18 @@ export default function ChannelPropertiesEditor({ isNew }: Props) {
<Snackbar />
{channel && (
<>
<Controller
<NumericFormControllerText
name="number"
control={control}
rules={{ required: true }}
render={({ field, formState: { errors } }) => (
<TextField
fullWidth
label="Channel Number"
margin="normal"
helperText={errors.number ? 'Channel number is required' : null}
{...field}
/>
)}
TextFieldProps={{
fullWidth: true,
label: 'Channel Number',
type: 'number',
margin: 'normal',
helperText: ({ formState: { errors } }) =>
errors.number ? 'Channel number is required' : null,
}}
/>
<Controller
name="name"
Expand Down

0 comments on commit 6e4731e

Please sign in to comment.