Skip to main content

tree_table/types/
dropdown.rs

1use alloc::{string::String, vec::Vec};
2
3use crate::Val;
4
5#[cfg_attr(feature = "tsify", derive(tsify::Tsify))]
6#[cfg_attr(feature = "tsify", tsify(from_wasm_abi))]
7#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
8#[derive(Debug, Clone, PartialEq, Eq, Copy)]
9pub enum DropdownState {
10    Normal,
11    Readonly,
12    Disabled,
13}
14
15#[cfg_attr(feature = "tsify", derive(tsify::Tsify))]
16#[cfg_attr(feature = "tsify", tsify(from_wasm_abi))]
17#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
18#[derive(Debug, Clone, PartialEq)]
19pub struct Dropdown {
20    pub vals: Vec<Val>,
21    pub default_val: Option<Val>,
22    pub validation: bool,
23    pub text: Option<String>,
24    pub state: DropdownState,
25}