mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-30 14:10:40 -04:00
Make folder controls update sticky JS on change
Also removes a call the `render` method which duplicates one already made by the `selectActionButtons` method on load.
This commit is contained in:
@@ -36,8 +36,6 @@
|
||||
|
||||
this.$form.on('click', 'button.button-secondary', (event) => this.actionButtonClicked(event));
|
||||
this.$form.on('change', 'input[type=checkbox]', () => this.templateFolderCheckboxChanged());
|
||||
|
||||
this.render();
|
||||
};
|
||||
|
||||
this.addCancelButton = function(state) {
|
||||
@@ -96,6 +94,11 @@
|
||||
this.states.forEach(
|
||||
state => (state.key === this.currentState ? this.$stickyBottom.append(state.$el) : state.$el.detach())
|
||||
);
|
||||
|
||||
// make sticky JS recalculate its cache of the element's position
|
||||
if ('stickAtBottomWhenScrolling' in GOVUK) {
|
||||
GOVUK.stickAtBottomWhenScrolling.recalculate();
|
||||
}
|
||||
};
|
||||
|
||||
this.nothingSelectedButtons = `
|
||||
|
||||
Reference in New Issue
Block a user