diff --git a/src/MatBlazor/Components/MatTable/MatTable.razor b/src/MatBlazor/Components/MatTable/MatTable.razor
index f3e07d73..a4203be4 100644
--- a/src/MatBlazor/Components/MatTable/MatTable.razor
+++ b/src/MatBlazor/Components/MatTable/MatTable.razor
@@ -141,7 +141,7 @@
var lastComma = tempPlaceholder.LastIndexOf(",");
- if (lastComma != -1)
+ if (lastComma != -1 && SearchTermFieldPlaceHolder == null)
{
SearchTermFieldPlaceHolder = tempPlaceholder.Remove(lastComma, 1).Insert(lastComma, " and");
}
@@ -164,7 +164,7 @@
if (PageSize <= 0)
PageSize = 5;
}
-
+
StartPage = 1;
CurrentPage = StartPage;
@@ -283,14 +283,14 @@
var doc = JsonDocument.Parse(pagedData);
var root = doc.RootElement;
string itemsString = root.GetProperty(PagingDataPropertyName).GetRawText();
-
+
var opt = new JsonSerializerOptions()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
};
-
+
var items = JsonSerializer.Deserialize>(itemsString, opt);
-
+
Items = items;
int count = root.GetProperty(PagingRecordsCountPropertyName).GetInt32();
RecordsFrom = (CurrentPage - 1) * PageSize;
@@ -341,13 +341,18 @@
ItemList = PageSize <= 0 ? filteredCollection : filteredCollection.Skip(RecordsFrom).Take(PageSize);
}
- else
+ else if (Items != null)
{
ItemList = PageSize <= 0 ? Items : Items.Skip(RecordsFrom).Take(PageSize);
RecordsTo = (RecordsFrom + PageSize < Items.Count()) ? RecordsFrom + PageSize : Items.Count();
TotalPages = Math.Max(1, (int)Math.Ceiling(Items.Count() / (decimal)PageSize));
EndPage = TotalPages;
}
+ else
+ {
+ ItemList = null;
+ }
+
SetPageSize(PageDirection.Next);
StateHasChanged();
}