Skip to content

Commit

Permalink
fixing playground console warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
OvidijusParsiunas committed Oct 19, 2023
1 parent 111bf1c commit 9026cf1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 12 additions & 8 deletions website/src/pages/playground.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,17 @@ export default function Playground() {
}

function setHorizontalScroll(componentList) {
componentList.addEventListener('wheel', (e) => {
if (!view.isGrid) {
// scroll only when there is overflow (useful when 1 element in column and no overflow)
if (componentList.scrollWidth > componentList.clientWidth) {
e.preventDefault();
componentList.scrollLeft += e.deltaY;
componentList.addEventListener(
'wheel',
(e) => {
if (!view.isGrid) {
// scroll only when there is overflow (useful when 1 element in column and no overflow)
if (componentList.scrollWidth > componentList.clientWidth) {
e.preventDefault();
componentList.scrollLeft += e.deltaY;
}
}
}
});
},
{passive: false}
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from 'react';

const DEMO_RESPONSE = {response: {text: "Click the 'Configure' button below to connect to a service."}};

export default function ChatComponent({config, colorMode}) {
export default function ChatComponent({config}) {
const componentRef = React.createRef(null);

// updating messages here to keep track of them so that when user moves to a different page they can be added to config
Expand Down

0 comments on commit 9026cf1

Please sign in to comment.