react-bootstrap-table2
react-bootstrap-table2 copied to clipboard
Custom Search Bar loses focus with custom column toggle after [email protected]
@AllenFang I used "Column toggle state gets reset with selectRow #1266" issue solution to not reset the column toggle preferences on row click or any other change in the table, also I have customized search bar, I updated my table and toolkit all upto the latest version released on 31-5-2020, the column toggle works fine but the search bar loses focus as soon as I type in the search bar. Can you please help me to find a solution for this?
I was able to resolve this using autoFocus in the input tag.Below is the snippet.
<input autoFocus ref={ref => inputRef = ref} onChange={onSearch} id="search-bar-0" type="text" aria-labelledby="search-bar-0-label" className="form-control " placeholder="Search" value={searchText} />
Hope this helps someone.