Skip to content

Commit

Permalink
Step 8 | Index local storage by firstName
Browse files Browse the repository at this point in the history
  • Loading branch information
amahdy committed Mar 30, 2017
1 parent 0e50c4c commit 3bd2166
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bower.json
Expand Up @@ -7,7 +7,8 @@
"vaadin-grid": "^1.2.2",
"pouchdb": "^6.1.2",
"paper-input": "^1.1.23",
"vaadin-split-layout": "^1.1.0"
"vaadin-split-layout": "^1.1.0",
"pouchdb-find": "^0.10.5"
},
"devDependencies": {
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
Expand Down
7 changes: 7 additions & 0 deletions src/offline-first-app/offline-first-app.html
@@ -1,5 +1,6 @@

<script src="../../bower_components/pouchdb/dist/pouchdb.min.js"></script>
<script src="../../bower_components/pouchdb-find/dist/pouchdb.find.min.js"></script>

<link rel="import" href="../../bower_components/vaadin-grid/vaadin-grid.html">
<link rel="import" href="../../bower_components/vaadin-split-layout/vaadin-split-layout.html">
Expand Down Expand Up @@ -110,6 +111,12 @@ <h3>Search</h3>
retry: true,
});

this.localDB.createIndex({
index: {
fields: ['firstName'],
}
});

var grid = this.$.lazyGrid;

grid.columns = [
Expand Down

0 comments on commit 3bd2166

Please sign in to comment.