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:
parent
e5d099ebce
commit
8cfa4e4001
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue