Skip to content

Fix category/types selector not updated on bulk edit (fix #1271)

Nicolas Frandeboeuf requested to merge nicofrand/reports-category-types-1271 into main

Issue #1271 comes from the mix of props & state: on initial render, props.value is used to initialize the defaultOption state. Subsequent renders will then use the value of the state previously set instead of props.value. Which means that passing a new value through the props won't do anything.

The fix is to never store the value in state, but rather rely on props.value. Any change should call onChange, and the parent has the responsibility of updating the dropdown.

Merge request reports

Loading