Skip to content

Commit

Permalink
Revert "Update IEditorItemExtensions.cs"
Browse files Browse the repository at this point in the history
This reverts commit f7f0607.
  • Loading branch information
卢骥 committed Dec 30, 2024
1 parent f7f0607 commit bd8f306
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/BootstrapBlazor/Extensions/IEditorItemExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this
// file to you under the Apache 2.0 License See the LICENSE file in the project root for more information.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone

using System.Reflection;
Expand Down Expand Up @@ -76,7 +77,7 @@ private static bool IsVisible(this IEditorItem item, ItemChangedType changedType
/// <returns></returns>
public static bool CanWrite(this IEditorItem item, Type modelType)
{
return typeof(IDynamicObject).IsAssignableFrom(modelType) || ComplexCanWrite();
return modelType == typeof(DynamicObject) || modelType.IsSubclassOf(typeof(DynamicObject)) || ComplexCanWrite();

bool ComplexCanWrite()
{
Expand Down

0 comments on commit bd8f306

Please sign in to comment.