Загрузка видео...

Не удалось загрузить видео

На главную

🍦 Nice little addition to a Laravel validation error: scroll your users back up to the error...

42,746 просмотров • 2 лет назад •via X (Twitter)

Комментарии: 11

Фото профиля Logan Craft
Logan Craft2 лет назад

What if the error is at the bottom of the form? Maybe better to have some JavaScript that looks for the first error in the list by targeting the form then getting the first element with .error class or something…

Фото профиля Caleb Porzio
Caleb Porzio2 лет назад

Yeah, I toyed with that too: x-init="$el.closest('form').querySelector('[aria-invalid=\'true\']').closest('label').scrollIntoView()" Kind of a mouth-full lol, but works great

Фото профиля Tuginho
Tuginho2 лет назад

Great for UX!

Фото профиля Swan Company Inc
Swan Company Inc2 лет назад

Your making life too easy for people like me but I'll take it! Honestly, I can't wait to show what I've been building with the TALL stack and the day it's profitable I'll be giving back as much as I can for everyone's hard work.

Фото профиля 𝕽𝖎𝖉𝖜𝖆𝖓𝖚𝖑𝖑𝖆𝖍🥰
𝕽𝖎𝖉𝖜𝖆𝖓𝖚𝖑𝖑𝖆𝖍🥰2 лет назад

Cool stuff, Caleb🥰

Фото профиля Ryan Bilesky
Ryan Bilesky2 лет назад

Why can't more apps do this? With how many times I click submit and get an error but don't know it because it's up at the top where am already scrolled passed and take a second to realize what's going on, I can only imagine how normal users must feel.

Фото профиля Λlex Wulf
Λlex Wulf2 лет назад

@filamentphp also supported by you?

Фото профиля Ifeanyichukwu John
Ifeanyichukwu John2 лет назад

Well done @calebporzio

Фото профиля Amit Mandaviya🇮🇳 | Full Stack| React JS| Laravel
Amit Mandaviya🇮🇳 | Full Stack| React JS| Laravel2 лет назад

@PovilasKorop That's literally what mostly we need when we have long forms.

Фото профиля Vincent Uche
Vincent Uche2 лет назад

Cool. What about a smooth scroll?

Фото профиля Caleb Porzio
Caleb Porzio2 лет назад

Pretty easy to add!

Похожие видео