Skip to content

Commit d2ff97b

Browse files
authored
preventing to send form onClick left/right arrows in SchemaTabs component (#796)
1 parent 74ba852 commit d2ff97b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- preventing to send form onClick left/right arrows in SchemaTabs component
2+
13
## 2.1.3 (Mar 22, 2024)
24

35
High level enhancements

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,13 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) {
7474
};
7575
}, []);
7676

77-
const handleRightClick = () => {
77+
const handleRightClick = (e) => {
78+
e.preventDefault();
7879
tabItemListContainerRef.current.scrollLeft += 90;
7980
};
8081

81-
const handleLeftClick = () => {
82+
const handleLeftClick = (e) => {
83+
e.preventDefault();
8284
tabItemListContainerRef.current.scrollLeft -= 90;
8385
};
8486

0 commit comments

Comments
 (0)