Skip to content

Commit

Permalink
fix(editor): SingleSelect Editor should show pick false value (#560)
Browse files Browse the repository at this point in the history
* fix(editor): SingleSelect Editor should show pick false value
- when using boolean with a SingleSelect Editor, the `false` value was not being selected when it should
  • Loading branch information
ghiscoding authored Aug 14, 2020
1 parent 326ec5f commit 0222d09
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -9,11 +9,11 @@
<i class="fa fa-github"></i>
<span>{{title}}</span>
</a>
<div class="github-button-container">
<span class="github-button-container">
<a href="https://github.com/ghiscoding/angular-slickgrid">
<img src="https://img.shields.io/github/stars/ghiscoding/angular-slickgrid?style=social">
</a>
</div>
</span>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ $icon-width-mdi-arrow-collapse: 14px;
$icon-width-mdi-arrow-expand: 14px;
$icon-width-mdi-close-thick: 12px;

/* You can change the SASS color via the associated variable, BUT it's better to use the recolor @mixing shown down below */
/* You can change the SASS color via the associated variable, BUT it's better to use the recolor @mixin shown down below */
// $icon-color-mdi-file-pdf-outline: #f14668;
// $icon-color-mdi-file-music-outline: #3298dc;
// $icon-color-mdi-file-excel-outline: #1E9F75;
3 changes: 1 addition & 2 deletions src/app/modules/angular-slickgrid/editors/selectEditor.ts
Original file line number Diff line number Diff line change
@@ -412,8 +412,7 @@ export class SelectEditor implements Editor {
// make sure the prop exists first
this.$editorElm.find('option').each((i: number, $e: any) => {
// check equality after converting originalValue to string since the DOM value will always be of type string
const strValue = currentValue && currentValue.toString && currentValue.toString();
$e.selected = (strValue === $e.value);
$e.selected = (`${currentValue}` === $e.value);
});
}

0 comments on commit 0222d09

Please sign in to comment.