MudBlazor icon indicating copy to clipboard operation
MudBlazor copied to clipboard

Cannot access derived types in edit template

Open thatstatsguy opened this issue 1 year ago • 1 comments

Bug type

Component

Component name

MudDataGrid

What happened?

Replication link: https://try.mudblazor.com/snippet/cEweOPdbGDYHVwFI

I've got a scenario where I'm unable to access information about derived types in the cell edit template.

The funny thing is that I'm able to access this information when defining a cell template within a template column.

See the link above for replication - in the edit template I'm unable to type check to see if the object I'm working with is a circle or a square class (always hits the default case) but in the cell template it works fine.

Expected behavior

The same behaviour in both the edit and cell template

Reproduction link

https://try.mudblazor.com/snippet/cEweOPdbGDYHVwFI

Reproduction steps

See attached code

Relevant log output

No response

Version (bug)

6.12.0

Version (working)

No response

What browsers are you seeing the problem on?

Chrome, Microsoft Edge

On what operating system are you experiencing the issue?

Windows

Pull Request

  • [ ] I would like to do a Pull Request

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

thatstatsguy avatar Jan 31 '24 08:01 thatstatsguy

Here's a crude workaround. Would prefer if this issue was addressed, though.

https://try.mudblazor.com/snippet/GOwouvdFxYNZxImH

jensgerntholtz avatar Jan 31 '24 08:01 jensgerntholtz