Skip to content

Commit f621777

Browse files
stakoovsserrata
authored andcommitted
preventing to send form onClick left/right arrows in SchemaTabs component (#796)
1 parent 7a4e93f commit f621777

File tree

1 file changed

+6
-4
lines changed
  • packages/docusaurus-theme-openapi-docs/src/theme/SchemaTabs

1 file changed

+6
-4
lines changed

packages/docusaurus-theme-openapi-docs/src/theme/SchemaTabs/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ function TabList({
9999
};
100100
}, []);
101101

102-
const handleRightClick = () => {
103-
tabItemListContainerRef.current!.scrollLeft += 90;
102+
const handleRightClick = (e) => {
103+
e.preventDefault();
104+
tabItemListContainerRef.current.scrollLeft += 90;
104105
};
105106

106-
const handleLeftClick = () => {
107-
tabItemListContainerRef.current!.scrollLeft -= 90;
107+
const handleLeftClick = (e) => {
108+
e.preventDefault();
109+
tabItemListContainerRef.current.scrollLeft -= 90;
108110
};
109111

110112
return (

0 commit comments

Comments
 (0)