Skip to content

Commit

Permalink
Should support IDynamicObject in IEditorItem CanWrite
Browse files Browse the repository at this point in the history
  • Loading branch information
卢骥 committed Dec 30, 2024
1 parent bd8f306 commit ed319b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/Extensions/IEditorItemExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private static bool IsVisible(this IEditorItem item, ItemChangedType changedType
/// <returns></returns>
public static bool CanWrite(this IEditorItem item, Type modelType)
{
return modelType == typeof(DynamicObject) || modelType.IsSubclassOf(typeof(DynamicObject)) || ComplexCanWrite();
return typeof(IDynamicObject).IsAssignableFrom(modelType) || ComplexCanWrite();

bool ComplexCanWrite()
{
Expand Down

0 comments on commit ed319b8

Please sign in to comment.