Skip to main content

Mountain/Command/TreeView/
OnTreeViewExpansionChanged.rs

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