From 44c1e91f055b666a587f347ec3be58f31e58bac7 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Sat, 15 Aug 2020 19:23:21 -0400 Subject: [PATCH] Call logic from onupdate in oncreate where relevant --- js/src/forum/components/Search.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/src/forum/components/Search.js b/js/src/forum/components/Search.js index 39dbf08b8..451afbf81 100644 --- a/js/src/forum/components/Search.js +++ b/js/src/forum/components/Search.js @@ -119,6 +119,9 @@ export default class Search extends Component { const search = this; const state = this.state; + // Highlight the item that is currently selected. + this.setIndex(this.getCurrentNumericIndex()); + this.$('.Search-results') .on('mousedown', (e) => e.preventDefault()) .on('click', () => this.$('input').blur())