react-bootstrap-table2 icon indicating copy to clipboard operation
react-bootstrap-table2 copied to clipboard

Custom Search Bar loses focus with custom column toggle after [email protected]

Open harmansinghvirk opened this issue 4 years ago • 1 comments

@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?

harmansinghvirk avatar Dec 22 '20 02:12 harmansinghvirk

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.

chandansingh01 avatar Apr 06 '22 19:04 chandansingh01