Question: In my HTML, this works

```
<div id="portfolio1" onclick="changeMainFrame('lib/portfolio1.html')">

```

to trigger the following function: 

```
function changeMainFrame(srcURL){
  var target = document.getElementById("mainFrame");
  target.src = srcURL;
}

```

I want to migrate it to my javascript doc. But this does not work:

```
document.getElementById("portfolio1").onclick = changeMainFrame("lib/portfolio1.html");

```

I can not find out how to fix this. Any hints? Cannot find a similar situation anywhere for something so simple yet time consuming.

Answer: 
I've used classes from `semantic-ui`'s `Sidebar` module to create the desired fixed sidebar. If you want a more `Component`(ish) code, you should replace the `pusher` class with it's correspondent `Sidebar.Pusher` Component.

Here's my code:

```
import React, { Component } from 'react'
import { Dropdown, Icon, Input, Menu } from 'semantic-ui-react'

export default class MySidebar extends Component {
    state = {}

    handleItemClick = (e, { name }) => this.setState({ activeItem: name })

    componentDidMount() {}

    render() {
        const { activeItem } = this.state

        return(
            <div className='pusher'>
                <div className='full height'>
                    <div className='toc'>
                        <Menu className='inverted vertical left fixed'>
                            <Menu.Item>
                                Home
                                <Icon name='dashboard' />
                                <Menu.Menu>
                                    <Menu.Item name='search' active={activeItem === 'search'} onClick={this.handleItemClick}>
                                        Search
                                    </Menu.Item>
                                    <Menu.Item name='add' active={activeItem === 'add'} onClick={this.handleItemClick}>
                                        Add
                                    </Menu.Item>
                                    <Menu.Item name='about' active={activeItem === 'about'} onClick={this.handleItemClick}>
                                        Remove
                                    </Menu.Item>
                                </Menu.Menu>
                            </Menu.Item>
                            <Menu.Item name='browse' active={activeItem === 'browse'} onClick={this.handleItemClick}>
                                <Icon name='grid layout' />
                                Browse
                            </Menu.Item>
                            <Menu.Item name='messages' active={activeItem === 'messages'} onClick={this.handleItemClick}>
                                Messages
                            </Menu.Item>

                            <Dropdown item text='More'>
                                <Dropdown.Menu>
                                    <Dropdown.Item icon='edit' text='Edit Profile' />
                                    <Dropdown.Item icon='globe' text='Choose Language' />
                                    <Dropdown.Item icon='settings' text='Account Settings' />
                                </Dropdown.Menu>
                            </Dropdown>
                        </Menu>
                    </div>
                    <div className='article'>
                        <div>Content</div>
                    </div>
                </div>
            </div>
        )
    }
}

```

And the style:

```
.toc {
    width: 200px;
}

.article {
    margin-left: 210px;
}

```
You would need to manually do it with some CSS/SCSS. Basically, you need to set the height to a fixed value. 

```
@media only screen and (max-width: 768px) {
  .ui.wide.left.sidebar, .ui.wide.right.sidebar {
    height: 100vh !important;
    position: absolute;
  }

  .pusher {
    margin-left: 20px;
  }
}

.pushable {
  min-height: 100vh;
}

.ui.wide.left.sidebar, .ui.wide.right.sidebar {
  height: 100vh;
  position: fixed !important;
  bottom: 0px !important;
  top: 0px !important;
}

```