Fixing incorrect behaviour with tags

This commit is contained in:
Florian Zevedei 2024-01-30 18:27:48 +01:00
parent b3edb95b55
commit 86792af214

View File

@ -927,8 +927,7 @@ public class TaggedButtonGrid : MultiView
{ {
Message m = null; Message m = null;
var form = DataSource.PickItems(CurrentPageIndex * ItemRowsPerPage, ItemRowsPerPage, ButtonForm form = null;
EnableSearch ? SearchQuery : null);
//if (this.EnableSearch && this.SearchQuery != null && this.SearchQuery != "") //if (this.EnableSearch && this.SearchQuery != null && this.SearchQuery != "")
//{ //{
@ -941,7 +940,16 @@ public class TaggedButtonGrid : MultiView
if (Tags != null && SelectedTags != null) if (Tags != null && SelectedTags != null)
{ {
form = DataSource.PickAllItems(EnableSearch ? SearchQuery : null); //CurrentPageIndex * ItemRowsPerPage, ItemRowsPerPage,
form = form.TagDuplicate(SelectedTags); form = form.TagDuplicate(SelectedTags);
form = new ButtonForm(form.ToRowList().Skip(CurrentPageIndex * ItemRowsPerPage).Take(ItemRowsPerPage));
}
else
{
form = DataSource.PickItems(CurrentPageIndex * ItemRowsPerPage, ItemRowsPerPage,
EnableSearch ? SearchQuery : null);
} }
if (EnablePaging) if (EnablePaging)