@@ -256,20 +256,6 @@ public partial class TreeView<TItem> : IModelEqualityComparer<TItem>
256256 [ Parameter ]
257257 public Func < TItem , string ? , Task < bool > > ? OnUpdateCallbackAsync { get ; set ; }
258258
259- [ NotNull ]
260- private string ? NotSetOnTreeExpandErrorMessage { get ; set ; }
261-
262- [ Inject ]
263- [ NotNull ]
264- private IStringLocalizer < TreeView < TItem > > ? Localizer { get ; set ; }
265-
266- [ Inject ]
267- [ NotNull ]
268- private IIconTheme ? IconTheme { get ; set ; }
269-
270- [ NotNull ]
271- private TreeNodeCache < TreeViewItem < TItem > , TItem > ? _treeNodeStateCache = null ;
272-
273259 /// <summary>
274260 /// Gets or sets whether to automatically update child nodes when the node state changes. Default is false.
275261 /// </summary>
@@ -282,12 +268,37 @@ public partial class TreeView<TItem> : IModelEqualityComparer<TItem>
282268 [ Parameter ]
283269 public bool AutoCheckParent { get ; set ; }
284270
285- private string ? _searchText ;
271+ /// <summary>
272+ /// Gets or sets whether to enable item dragging. Default is false.
273+ /// </summary>
274+ [ Parameter ]
275+ public bool ItemDraggable { get ; set ; }
276+
277+ /// <summary>
278+ /// Gets or sets the callback method to be invoked when an item is dropped.
279+ /// Drop action can be cancelled by returning false.
280+ /// </summary>
281+ [ Parameter ]
282+ public Func < TreeDropEventArgs < TItem > , Task < bool > > OnDrop { get ; set ; } = _ => Task . FromResult ( true ) ;
283+
284+ [ Inject ]
285+ [ NotNull ]
286+ private IStringLocalizer < TreeView < TItem > > ? Localizer { get ; set ; }
287+
288+ [ Inject ]
289+ [ NotNull ]
290+ private IIconTheme ? IconTheme { get ; set ; }
286291
287292 private string ? EnableKeyboardString => EnableKeyboard ? "true" : null ;
288293
289- private bool _shouldRender = true ;
294+ [ NotNull ]
295+ private string ? NotSetOnTreeExpandErrorMessage { get ; set ; }
290296
297+ [ NotNull ]
298+ private TreeNodeCache < TreeViewItem < TItem > , TItem > ? _treeNodeStateCache = null ;
299+
300+ private string ? _searchText ;
301+ private bool _shouldRender = true ;
291302 private bool _init ;
292303
293304 /// <summary>
@@ -727,19 +738,6 @@ public void ClearCheckedItems()
727738 StateHasChanged ( ) ;
728739 }
729740
730- /// <summary>
731- /// Gets or sets whether to enable item dragging. Default is false.
732- /// </summary>
733- [ Parameter ]
734- public bool ItemDraggable { get ; set ; }
735-
736- /// <summary>
737- /// Gets or sets the callback method to be invoked when an item is dropped.
738- /// Drop action can be cancelled by returning false.
739- /// </summary>
740- [ Parameter ]
741- public Func < TreeDropEventArgs < TItem > , Task < bool > > OnDrop { get ; set ; } = _ => Task . FromResult ( true ) ;
742-
743741 private bool _previewDrop ;
744742 private TreeViewItem < TItem > ? _draggingItem ;
745743
0 commit comments