Skip to main content

Mountain/Command/TreeView/
OnTreeViewExpansionChanged.rs

1
2//! Tauri command - notify the provider when a tree node is
3//! expanded / collapsed.
4//!
5//! ## Stub
6//!
7//! Wire `OnTreeNodeExpanded` into `CommonTreeViewProvider` and
8//! dispatch here so providers can lazily load child items or persist
9//! expansion state across sessions.
10
11use std::sync::Arc;
12
13use serde_json::{Value, json};
14use tauri::{AppHandle, State, Wry, command};
15
16use crate::{ApplicationState::State::ApplicationState::ApplicationState, dev_log};
17
18#[command]
19pub async fn OnTreeViewExpansionChanged(
20	_ApplicationHandle:AppHandle<Wry>,
21
22	_State:State<'_, Arc<ApplicationState>>,
23
24	_ViewId:String,
25
26	_ElementHandle:String,
27
28	_IsExpanded:bool,
29) -> Result<Value, String> {
30	dev_log!("commands", "warn: OnTreeViewExpansionChanged not implemented");
31
32	Ok(json!({ "success": false, "error": "OnTreeNodeExpanded method not implemented" }))
33}