* Added initial value to `savedValues`

This commit adds an initial value to `savedValues` in the "Business Details" step in the OBW

* Added readme.txt line

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
This commit is contained in:
Fernando 2021-02-04 16:40:58 -03:00 committed by GitHub
parent 816b68eb83
commit 601c177b19
2 changed files with 7 additions and 1 deletions

View File

@ -410,6 +410,8 @@ class BusinessDetails extends Component {
}
render() {
const { initialValues } = this.props;
// There is a hack here to help us manage the selected tab programatically.
// We set the tab name "current-tab". when its the one we want selected. This tricks
// the logic in the TabPanel and allows us to switch which tab has the name "current-tab"
@ -420,7 +422,10 @@ class BusinessDetails extends Component {
initialTabName="current-tab"
onSelect={ ( tabName ) => {
if ( this.state.currentTab !== tabName ) {
this.setState( { currentTab: tabName } );
this.setState( {
currentTab: tabName,
savedValues: initialValues,
} );
}
} }
tabs={ [

View File

@ -86,6 +86,7 @@ Release and roadmap notes are available on the [WooCommerce Developers Blog](htt
- Dev: Remove old debug code for connecting to Calypso / Wordpress.com. #6097
- Tweak: Refactored extended task list. #6081
- Fix: Fixed the Add First Product email note checks. #6260
- Fix: Onboarding - Fixed "Business Details" error. #6271
== Changelog ==