Scroll to Inspected Element
Summary: changelog: Add scroll to inspected element in layout plugin Before this diff, when one inspected an element, one needed to scroll down to see highlighted line for that element. This diff added automatic scroll to inspected element. It will scroll so that the line is in middle of the app. Also, fix direct state mutation and this error: ``` Public property 'onKeyDown' of exported class has or is using private name 'Element'. ``` Reviewed By: passy, mweststrate Differential Revision: D20798587 fbshipit-source-id: 763eb63cd51abd73940e301e36e89232033722c3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e68cbe8ecd
commit
e37bccaf04
@@ -68,7 +68,7 @@ export default class Search extends Component<Props, State> {
|
||||
this.timer = setTimeout(() => this.performSearch(value), 200);
|
||||
};
|
||||
|
||||
onKeyDown = (e: React.KeyboardEvent) => {
|
||||
onKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
||||
if (e.key === 'Enter') {
|
||||
this.performSearch(this.state.value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user