Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.unsubscribe = listStore.subscribe((before, after) => {
if (DEBUG) console.log('listStore.subscribe', before, after); // eslint-disable-line no-console
const el = this.listRef.current;
if (el && el.offsetTop < window.scrollY) {
scroll(el, { offset: -10 });
}
});
}
some(Object.keys(errors), (key) => {
const id = `#${getControlHtmlId(controls[key])}`;
scrollTo(id);
});
console.error('Form.onError', errors);
scrollToTop() {
scrollTo(0);
}