mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): admin settings number input validation (#9470)
* fix(web): admin settings number input validation * fix import by creating *.ts file * just ignore import error
This commit is contained in:
parent
4d7aa7effd
commit
acc611a3d9
4 changed files with 48 additions and 4 deletions
|
|
@ -25,9 +25,7 @@
|
|||
export let isEdited = false;
|
||||
export let passwordAutocomplete: string = 'current-password';
|
||||
|
||||
const handleInput = (e: Event) => {
|
||||
value = (e.target as HTMLInputElement).value;
|
||||
|
||||
const validateInput = () => {
|
||||
if (inputType === SettingInputFieldType.NUMBER) {
|
||||
let newValue = Number(value) || 0;
|
||||
if (newValue < min) {
|
||||
|
|
@ -79,7 +77,8 @@
|
|||
{step}
|
||||
{required}
|
||||
{value}
|
||||
on:input={handleInput}
|
||||
on:input={(e) => (value = e.currentTarget.value)}
|
||||
on:blur={validateInput}
|
||||
{disabled}
|
||||
{title}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue