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//! TODO: stub. Wire `OnTreeNodeExpanded` into
7//! `CommonTreeViewProvider` and dispatch here so providers can
8//! lazily load child items or persist expansion state across
9//! 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	_State:State<'_, Arc<ApplicationState>>,
22	_ViewId:String,
23	_ElementHandle:String,
24	_IsExpanded:bool,
25) -> Result<Value, String> {
26	dev_log!("commands", "warn: OnTreeViewExpansionChanged not implemented");
27	Ok(json!({ "success": false, "error": "OnTreeNodeExpanded method not implemented" }))
28}