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.
Related Issues (20)
- Remove all package.json from solution projects
- Use latest C# language version HOT 5
- Disable item in DropdownList HOT 4
- [Bug]: Null Reference Exception in Carousel when navigating away while carousel is animating
- [Bug]: IntervalBeforeClose does not work in NotificationService
- [Bug]: max-width on DataGridColumn does not work HOT 4
- [Bug]: DataGrid When using ReadData, click the header to sort or click the button of the paging component, the checkbox of DataGridMultiSelectColumn cannot remain selected. HOT 8
- [Bug]: Cropper does not display base64 image sources
- Blog: roadmap
- DataGrid : PagerElementPosition
- Migarte Animate extension to v4
- Datepicker - Clear HOT 2
- [Bug]: RichtTextEdit - Cursor jumping to starting point of editor HOT 2
- [Bug]: DataGrid batch edit SOMETIMES saves if using tab in In cell mode HOT 4
- Show arrow for autocomplete HOT 6
- Autocomplete : Checkbox Menu closes when an item is unselected
- [Bug]: SignaturePad not rendering Value parameter HOT 8
- [Bug]: Width and Height .Is66/.Is33 properties do not work for Bootstrap 5
- DataGrid grouping example confusing HOT 5
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.