1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-18 21:35:27 -04:00

Improve typings in FormInputGroup

This commit is contained in:
Mark McDowall
2025-01-03 09:47:17 -08:00
parent b218461678
commit 6838f068bc
44 changed files with 321 additions and 281 deletions
@@ -61,10 +61,10 @@ function TableOptionsModal({
dropIndex > dragIndex;
const handlePageSizeChange = useCallback(
({ value }: InputChanged<number>) => {
({ value }: InputChanged<number | null>) => {
let error: string | null = null;
if (value < 5) {
if (value === null || value < 5) {
error = translate('TablePageSizeMinimum', {
minimumValue: '5',
});
@@ -76,7 +76,7 @@ function TableOptionsModal({
onTableOptionChange({ pageSize: value });
}
setPageSize(value);
setPageSize(value ?? 0);
setPageSizeError(error);
},
[maxPageSize, onTableOptionChange]