`document.getElementById` is returning null even if the id is present. I am not getting what's wrong with my code.

```
optionsChange() {
  let test = document.getElementById("filterOptions");
  let opVal= test.options[test.selectedIndex].text;
  console.log("options...", opVal);
}

```

Following code is written in `render` method

```
<select
  type="text"
  className="form-control"
  name="filterOptions"
  id="filterOptions"
  onChange={this.optionsChange()}
>
  <option key="select" value="allValues">All Values</option>
  {this.renderFilterOptions(item)}
</select>

```

Can someone help please any guide me..