Skip to content

Commit

Permalink
fix: 검색창 입력시 기본 새로고침 해제
Browse files Browse the repository at this point in the history
  • Loading branch information
not-using committed Oct 31, 2023
1 parent dc2e985 commit a81f599
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/component/utils/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ export type Props = ComponentProps<"form"> & {
const SearchBar = ({
width = "banner",
className = "",
onSubmit,
children,
...rest
}: Props) => {
return (
<form {...rest} className={`search-bar__wrapper ${width} ${className}`}>
<form
{...rest}
className={`search-bar__wrapper ${width} ${className}`}
onSubmit={e => {
e.preventDefault();
onSubmit && onSubmit(e);
}}
>
{children}
</form>
);
Expand Down

0 comments on commit a81f599

Please sign in to comment.