mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 07:22:35 +01:00
Fixed: Auto-focusing Filter series import during import series
This commit is contained in:
parent
a32b6276bd
commit
3586d7042b
@ -17,6 +17,8 @@ class Scroller extends Component {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const {
|
const {
|
||||||
|
scrollDirection,
|
||||||
|
autoFocus,
|
||||||
scrollTop
|
scrollTop
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
@ -24,7 +26,9 @@ class Scroller extends Component {
|
|||||||
this._scroller.scrollTop = scrollTop;
|
this._scroller.scrollTop = scrollTop;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._scroller.focus({ preventScroll: true });
|
if (autoFocus && scrollDirection !== scrollDirections.NONE) {
|
||||||
|
this._scroller.focus({ preventScroll: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -73,6 +77,7 @@ class Scroller extends Component {
|
|||||||
Scroller.propTypes = {
|
Scroller.propTypes = {
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
scrollDirection: PropTypes.oneOf(scrollDirections.all).isRequired,
|
scrollDirection: PropTypes.oneOf(scrollDirections.all).isRequired,
|
||||||
|
autoFocus: PropTypes.bool.isRequired,
|
||||||
autoScroll: PropTypes.bool.isRequired,
|
autoScroll: PropTypes.bool.isRequired,
|
||||||
scrollTop: PropTypes.number,
|
scrollTop: PropTypes.number,
|
||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
@ -82,6 +87,7 @@ Scroller.propTypes = {
|
|||||||
|
|
||||||
Scroller.defaultProps = {
|
Scroller.defaultProps = {
|
||||||
scrollDirection: scrollDirections.VERTICAL,
|
scrollDirection: scrollDirections.VERTICAL,
|
||||||
|
autoFocus: true,
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
registerScroller: () => {}
|
registerScroller: () => {}
|
||||||
};
|
};
|
||||||
|
@ -62,7 +62,10 @@ class SelectSeriesModalContent extends Component {
|
|||||||
onChange={this.onFilterChange}
|
onChange={this.onFilterChange}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Scroller className={styles.scroller}>
|
<Scroller
|
||||||
|
className={styles.scroller}
|
||||||
|
autoFocus={false}
|
||||||
|
>
|
||||||
{
|
{
|
||||||
items.map((item) => {
|
items.map((item) => {
|
||||||
return item.title.toLowerCase().includes(filter) ?
|
return item.title.toLowerCase().includes(filter) ?
|
||||||
|
Loading…
Reference in New Issue
Block a user