Skip to content

Commit

Permalink
Merge pull request #3 from rene-lindner-isw/master
Browse files Browse the repository at this point in the history
2.0, fallbackSelection, bugfix.
rene-lindner-isw authored Apr 28, 2017
2 parents e211163 + 2ad8a53 commit 5b1c66a
Showing 2 changed files with 19 additions and 13 deletions.
10 changes: 6 additions & 4 deletions isw-route-selector.html
Original file line number Diff line number Diff line change
@@ -108,11 +108,13 @@
}
}
}
}

if( match ) {
this.set( 'data', match.data );
this.selectIndex( match.index );
}
if( match ) {
this.set( 'data', match.data );
this.set( 'selected', this._indexToValue( match.index ) );
} else {
this.select( this.fallbackSelection );
}
}
}
22 changes: 13 additions & 9 deletions isw-route.html
Original file line number Diff line number Diff line change
@@ -12,17 +12,21 @@
</template>

<script>
Polymer( {
is: 'isw-route',
class IswRoute extends Polymer.Element {
static get is() {
return 'isw-route';
}

properties: {
/**
* The pattern of slash-separated segments to match path against.
*/
pattern: {
type: String
static get properties() {
return {
/**
* The pattern of slash-separated segments to match path against.
*/
pattern: {
type: String
}
}
}
});
}
</script>
</dom-module>

0 comments on commit 5b1c66a

Please sign in to comment.