Obsidian Dynamic data, when sorted by column is duplicating rows
Description
When using the Obsidian Dynamic data block, when you go to use any column to sort the rows it ends up duplicating the row instead, when you refresh the page it goes back to the original list view without the duplicates.
Actual Behavior
When you hit to sort button it will sort the rows of data but will also duplicate some rows.
Expected Behavior
When you sort the list it should sort in order of the column, but not add any new rows into the list.
Steps to Reproduce
- Create a page with the obsidian Dynamic data block.
- I added this SQL into the List to pull a list of giving.
SELECT p.Id, FORMAT(ft.[TransactionDateTime], 'yyyy-MM-dd', 'en-US') AS "Transaction Date", ftd.Amount AS "Gift Amount", fa.[Name] AS "Account Name" FROM FinancialTransactionDetail ftd JOIN FinancialTransaction AS ft ON ft.Id = ftd.TransactionId JOIN PersonAlias AS pa ON pa.Id = ft.AuthorizedPersonAliasId JOIN Person AS p ON p.Id = pa.[PersonId] JOIN FinancialAccount AS fa ON fa.Id = ftd.[AccountId]
3. Save the Page settings.
4. Go to sort the list by "Gift Amount".
5. You can see that it starts to duplicate the rows.
Issue Confirmation
- [X] Perform a search on the Github Issues to see if your bug or enhancement is already reported.
- [X] Reproduced the problem on a fresh install or on the demo site.
Rock Version
v16.6
Client Culture Setting
en-US
@kwishard88 I wasn't able to reproduce duplicate rows displaying when sorting the Gift Amount column on the demo site (v16.6) or on prealpha. I confirmed the number of rows that should return by running the same SQL through the SQL Editor. However, I did notice that the sorting of the 'Gift Amount' column on the obsidian Dynamic Data block isn't working correctly.
It would be greatly appreciated if you could include screenshots of the duplicate rows that are returned and confirm if you can recreate the issue on the demo site.
@chead4 If you go to this page on the Prealpha site.
https://prealpha.rocksolidchurchdemo.com/page/833
This is where I made the test page.
When I sort the gift amount and hit the sort button about 3-4 times you can start to see the UI Will Duplicate in the table.
You can see this when you need to scroll down your page to see them.
I'll add a screen shot
@kwishard88 Thanks so much. That is very helpful.
@kylehenning thanks for fixing this!
@kwishard88 of course! Thanks for helping us make Rock awesome!