Skip to content

Commit dda6548

Browse files
committed
2 parents d32df34 + 171d617 commit dda6548

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Griddly/Controllers/HomeController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ static DateTime GetRandomDate(Random r, DateTime from, DateTime to)
242242

243243
public ActionResult IndexGrid(string item, int? quantityStart, int? quantityEnd, decimal? totalStart, decimal? totalEnd, string firstName, string lastName, bool? isApproved)
244244
{
245-
this.SetGriddlyDefault(ref isApproved, "isApproved", true);
245+
this.SetGriddlyDefault(ref isApproved, "isApproved", false);
246246

247247
IQueryable<SimpleOrder> query = _indexTestData;
248248

Griddly/Views/Shared/Griddly/Griddly.cshtml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
});
122122

123123
bool isDefaultSort = true;
124-
124+
125125
if (defaultSort != null && Model.SortFields != null && defaultSort.Length == Model.SortFields.Length)
126126
{
127127
for (int i = 0; i < defaultSort.Length; i++)
@@ -141,6 +141,15 @@
141141
isDefaultSort = false;
142142
}
143143

144+
// TODO: make js know how to do real bools
145+
foreach (var pair in defaultFilters.ToList())
146+
{
147+
if (pair.Value as bool? != null)
148+
{
149+
defaultFilters[pair.Key] = pair.Value.ToString().ToLower();
150+
}
151+
}
152+
144153
if (!GriddlySettings.DisableHistoryParameters)
145154
{
146155
<input class="griddly-init-flag" type="hidden" />

0 commit comments

Comments
 (0)