addon card fixes

- Fix settings button not enabling/disabling after enabling/disabling addon
- Fix auto-scroll issue on settings click
This commit is contained in:
Zack Rauen 2020-07-17 23:53:01 -04:00
parent e5d099ebce
commit 8cfa4e4001
3 changed files with 5 additions and 4 deletions

File diff suppressed because one or more lines are too long

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -45,8 +45,8 @@ export default class AddonCard extends React.Component {
};
const thisNode = this.panelRef.current;
const container = thisNode.closest(".scroller");
if (!isHidden(container, thisNode)) return;
const container = thisNode.closest(".scrollerBase-289Jih");
if (!container || !isHidden(container, thisNode)) return;
const thisNodeOffset = DOM.offset(thisNode);
const containerOffset = DOM.offset(container);
const original = container.scrollTop;
@ -66,6 +66,7 @@ export default class AddonCard extends React.Component {
onChange() {
this.props.onChange && this.props.onChange(this.props.addon.id);
this.props.enabled = !this.props.enabled;
this.forceUpdate();
}
showSettings() {