refresh products list suggestion colspan when screen options change
This commit is contained in:
parent
d0fd15ea8c
commit
f944da3eac
|
@ -198,6 +198,7 @@
|
|||
row.dataset.suggestionSlug = slug;
|
||||
|
||||
var cell = document.createElement( 'td' );
|
||||
cell.classList.add( 'marketplace-table-banner-td' );
|
||||
cell.setAttribute( 'colspan', getTableBannerColspan() );
|
||||
|
||||
var container = document.createElement( 'div' );
|
||||
|
@ -309,6 +310,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
function refreshBannerColspanForScreenOptions( content ) {
|
||||
$( '#show-settings-link' ).on( 'focus.scroll-into-view', function() {
|
||||
$( '.marketplace-table-banner-td' ).attr( 'colspan', getTableBannerColspan() );
|
||||
});
|
||||
}
|
||||
|
||||
// Render suggestion data in appropriate places in UI.
|
||||
function displaySuggestions( marketplaceSuggestionsApiData ) {
|
||||
var usedSuggestionsContexts = [];
|
||||
|
@ -418,6 +425,8 @@
|
|||
|
||||
usedSuggestionsContexts.push( context );
|
||||
|
||||
refreshBannerColspanForScreenOptions( content );
|
||||
|
||||
window.wcTracks.recordEvent( 'marketplace_suggestion_displayed', {
|
||||
suggestionSlug: suggestionToDisplay.slug
|
||||
} );
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue