Comments (4)
Hello @joergkrause
It's verified that the object reference for the Selected Item is not contained in the AllItems.
I have to say, I don't fully understand how that library works behind the scenes, but if new object references are being generated, I guess this can happen.
I solved your issue by just loading the data outside of the MediaR usage. This makes sure the object references don't change.
So it seems like to me that the DataGrid
is working as expected with what's bound reference wise.
Let us know if this helps.
from blazorise.
Thanks for digging into this. It's weird that I used Fluxor now whoch has a similar approach and don't see the effect there. I'm going to reach out to the MediatR guys to see whether they can have a look.
However, the approach to exclude the data from state feels wrong and makes the whole code more complex.
Also, as far as I remember in Blazor the @key property can be set to anything to handle such scenario. Would that be possible in the Grid here?
from blazorise.
Thanks for digging into this. It's weird that I used Fluxor now whoch has a similar approach and don't see the effect there. I'm going to reach out to the MediatR guys to see whether they can have a look.
Well I guess you're just further concluding that something with the MediatR
internals works differently then what we would be expecting. I'm guessing it somehow produces different in memory references. I would expect that they would be the same, but maybe that's something that can be configurable, or maybe even a conscious part of their implementation for some special reason.
I would try to focus on the MediaR
object reference thing, and show them an example where the original reference you gave it is lost. I would make sure you take as many things out of the equation as possible and nothing in your code is producing those "unexpected" results before giving them the example.
Keep us updated.
This Key
implementation would be different then the @key
property reserved for Blazor.
It could also be named Id
, but I think Key
better represents it. I'm thinking that you could even bind something like a complex key or something. So Func<TItem,object>
would work nicely I think?
It does not necessarily need to be named Key
either, we usually use verbs as suffixs to represent Func, i.e KeyGetter
KeyAccessor
etc..
from blazorise.
This is an automated message reminding that this issue is expecting the author's answer.
from blazorise.
Related Issues (20)
- [Bug]: ColumnChooser is not aligned with pager HOT 1
- [Docs] Typo in the Button component page
- [Bug]: Form inputs do not have a name HOT 3
- SelectList not executing the callback set for SelectedValueChanged HOT 2
- [Bug] DataGrid not works for large data first load HOT 1
- [2.0] Unify input component APIs HOT 3
- .srt subtitle files for video player HOT 2
- Docs : Blazorise Chart DataLabels Fix extension name
- [Bug]: JSException from Blazorise modal HOT 14
- ListView only Shows first 1.000 entries of a large list. HOT 1
- Add more Styling options for ListView Itemtemplates HOT 4
- [Docs] Automate API documentation HOT 5
- Add FilterTemplate examples to the DataGrid Docs HOT 1
- Getting 404 error playing clearkey hls with token in the Video player HOT 9
- [Bug]: headergroupcaption and displayable not working properly together
- Change type of ChartStreamingOptions.Delay from int? to long? HOT 3
- [Bug]: Grouping a Datagrid that uses Virtualize on an external source does not work HOT 3
- [2.0] DataGrid: Change Width from string to IFluentSizing
- Add MultiSelection to Datagrid SelectColumn HOT 11
- DataGrid.SelectedRow doesn't work - what am I doing wrong? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blazorise.