Fixes two ui issues (#206)

* Fixes two ui issues

References #205
- Fixes issue when in Table mode for the artist index when you click on a letter and error was thrown
- The VirtualTable reference was not set prior to trying to access functions on the object

Also fixes another ui issue I saw, when you were in the search box, the up and down arrows would not work in the Autocomplete componenet, this fixes that.

Gitignore changes to ignore my Idea projects

Adds .editorconfig for editors that respect that to maintain spacing and other config

* Changers per @QStick and the code review.

- Moved Ref out to funtion rather than inline as that can cause a performance hit
- Changed line in gitignore to ignore any .idea folder
- Cleaned up the editorconfig file
- Used proper background color in the CSS for the search suggestions
-
This commit is contained in:
David Bates
2018-02-11 09:57:00 -06:00
committed by Qstick
parent 24ff756eeb
commit 54ca73f474
5 changed files with 31 additions and 6 deletions
@@ -9,10 +9,22 @@ import ArtistIndexRow from './ArtistIndexRow';
import styles from './ArtistIndexTable.css';
class ArtistIndexTable extends Component {
constructor(props, context) {
super(props, context);
this._table = null;
}
//
// Control
/**
* Sets the reference to the virtual table
* @param ref
*/
setTableRef = (ref) => {
this._table = ref;
};
scrollToFirstCharacter(character) {
const items = this.props.items;
@@ -74,6 +86,7 @@ class ArtistIndexTable extends Component {
return (
<VirtualTable
ref={this.setTableRef}
className={styles.tableContainer}
items={items}
scrollTop={scrollTop}