'Simple React Component does not update

I have the following component: Somehow DropdownMultiselect does not update, even though the variables changed. What do I wrong here?

function Sidebar({chartOptions}) {
  let variables = []
  if(chartOptions){
    variables = chartOptions
  }

  return (
    <DropdownMultiselect options={variables} name="variables"/>
  )
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source