Jump direct to preview if no further settings are required woocommerce/woocommerce-blocks#68
This commit is contained in:
parent
06e76d402a
commit
55054fcd02
|
@ -836,10 +836,15 @@ registerBlockType('woocommerce/products', {
|
|||
function getSettingsEditor() {
|
||||
|
||||
var update_display_callback = function update_display_callback(value) {
|
||||
|
||||
// These options have setting screens that need further input from the user, so keep edit mode open.
|
||||
var needsFurtherSettings = ['specific', 'attribute', 'category'];
|
||||
|
||||
if (display !== value) {
|
||||
setAttributes({
|
||||
display: value,
|
||||
display_setting: []
|
||||
display_setting: [],
|
||||
edit_mode: needsFurtherSettings.includes(value)
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -572,10 +572,15 @@ registerBlockType( 'woocommerce/products', {
|
|||
function getSettingsEditor() {
|
||||
|
||||
const update_display_callback = ( value ) => {
|
||||
|
||||
// These options have setting screens that need further input from the user, so keep edit mode open.
|
||||
const needsFurtherSettings = [ 'specific', 'attribute', 'category' ];
|
||||
|
||||
if ( display !== value ) {
|
||||
setAttributes( {
|
||||
display: value,
|
||||
display_setting: [],
|
||||
edit_mode: needsFurtherSettings.includes( value ),
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue