Skip to content

Commit

Permalink
fix: carousel buttons - removed - blocking chart
Browse files Browse the repository at this point in the history
  • Loading branch information
jcw780 committed Jul 14, 2020
1 parent 5b0cd9c commit a96a5d9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/components/Charts/Charts.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
font-size: 1.25rem;
}

.carousel-control-next{
width: 0;
}

.carousel-control-prev{
width: 0;
}

.carousel-control>.carousel-button{
font-size: inherit;
}
Expand Down
11 changes: 7 additions & 4 deletions src/components/Charts/Charts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,18 @@ interface subGroupProps {
onUpdate: Function, carousel: boolean,
dimensions: {height: number, width: number},
}
class SubGroup extends React.Component<subGroupProps, {index: number}>{
class SubGroup extends React.Component<subGroupProps, {index: number, locked: boolean}>{
public static defaultProps = {updateLinks: false, carousel: true};
state = {index: 0};
state = {index: 0, locked: true};
scrollRef = React.createRef<any>();
private handleSelect = (selectedIndex:number, e) => {
this.setState({index: selectedIndex});
if(!this.state.locked){
this.setState({index: selectedIndex});
}
}
private handleSelectButton = value => {
this.setState({index: parseInt(value)});
const intValue = parseInt(value);
this.setState({index: intValue});
}
private addButtons = () => {
return (
Expand Down

0 comments on commit a96a5d9

Please sign in to comment.