1use ag_grid_derive::FromInterface;
4use wasm_bindgen::prelude::*;
5
6#[wasm_bindgen]
7extern "C" {
8 pub(crate) type ISortModelItem;
9
10 #[wasm_bindgen(method, getter, js_name = colId)]
11 fn col_id(this: &ISortModelItem) -> String;
12
13 #[wasm_bindgen(method, getter)]
14 fn sort(this: &ISortModelItem) -> SortDirection;
15}
16
17#[derive(Debug, FromInterface)]
19pub struct SortModelItem {
20 pub col_id: String,
22 pub sort: SortDirection,
24}
25
26#[wasm_bindgen]
28#[derive(Debug)]
29pub enum SortDirection {
30 Asc = "asc",
31 Desc = "desc",
32}