From 1d0134ebe5e4bbc0c3c898be8592cdefdb59e655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sans=C3=A3o=20Araldi?= Date: Fri, 5 Jul 2024 22:34:17 -0300 Subject: [PATCH] fix: cancel submit event of the `form` tag and small adjust in padding value of the `Container` component --- CHANGELOG.md | 8 +++----- src/components/Container/index.tsx | 2 +- src/components/SearchInput/index.tsx | 20 ++++++++++++-------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b3eeb1..08830f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,13 @@ # [1.2.0](https://github.com/ArtelierMaisa/artelier-maisa-admin/compare/v1.1.0...v1.2.0) (2024-07-03) - ### Features -* add `meta` tags to show platform preview ([3f4461b](https://github.com/ArtelierMaisa/artelier-maisa-admin/commit/3f4461b4ee12605ae15d8fc8bc915937f71762b4)) - +- add `meta` tags to show platform preview ([3f4461b](https://github.com/ArtelierMaisa/artelier-maisa-admin/commit/3f4461b4ee12605ae15d8fc8bc915937f71762b4)) ### Performance Improvements -* change all components to use `memo` to improve application performance ([d2907ff](https://github.com/ArtelierMaisa/artelier-maisa-admin/commit/d2907ff0d012c820dc303d49375f00de83426d17)) -* improve search category by name in `onSearch` function ([c8fed3d](https://github.com/ArtelierMaisa/artelier-maisa-admin/commit/c8fed3d936c50111f4bd2051d4a1ecdefbcfd974)) +- change all components to use `memo` to improve application performance ([d2907ff](https://github.com/ArtelierMaisa/artelier-maisa-admin/commit/d2907ff0d012c820dc303d49375f00de83426d17)) +- improve search category by name in `onSearch` function ([c8fed3d](https://github.com/ArtelierMaisa/artelier-maisa-admin/commit/c8fed3d936c50111f4bd2051d4a1ecdefbcfd974)) # [1.1.0](https://github.com/ArtelierMaisa/artelier-maisa-admin/compare/v1.0.0...v1.1.0) (2024-07-03) diff --git a/src/components/Container/index.tsx b/src/components/Container/index.tsx index c92b779..e924f54 100644 --- a/src/components/Container/index.tsx +++ b/src/components/Container/index.tsx @@ -6,7 +6,7 @@ function Container(props: ContainerProps) { const { children } = props; return ( -
+
{children}
); diff --git a/src/components/SearchInput/index.tsx b/src/components/SearchInput/index.tsx index c2712f0..89ac038 100644 --- a/src/components/SearchInput/index.tsx +++ b/src/components/SearchInput/index.tsx @@ -1,4 +1,4 @@ -import { memo } from 'react'; +import { FormEvent, memo } from 'react'; import { SearchInputProps } from '../../@types'; import { GenericButton, Icon } from '../'; @@ -6,9 +6,18 @@ import { GenericButton, Icon } from '../'; function SearchInput(props: SearchInputProps) { const { searchValue, onChange, onSearch } = props; + function onSubmit(event: FormEvent): void { + event.preventDefault(); + + if (onSearch) onSearch(); + } + return ( <> -
+