/// Copy a flat (unpivoted with all columns) CSV to the clipboard.
Copy a flat (unpivoted with all columns) CSV to the clipboard.
Copy a flat ( unpivoted with all columns ) CSV to the clipboard .
pub async fn copy_flat(table: &JsPerspectiveTable) -> Result<(), JsValue> {
    let csv_ref: Rc<RefCell<Option<String>>> = Rc::new(RefCell::new(None));
    poll(0, csv_ref.clone())?;
    let view = table.view(&ViewConfig::default().as_jsvalue()?).await?;
    let csv = copy_async(&view).await?;
    view.delete().await?;
    *csv_ref.borrow_mut() = Some(csv.as_string().unwrap());
    Ok(())
}
pub async fn copy_flat ( table : & JsPerspectiveTable ) -> Result < ( ) , JsValue > { let csv_ref : Rc < RefCell < Option < String > > > = Rc :: new ( RefCell :: new ( None ) ) ; poll ( 0 , csv_ref . clone ( ) ) ? ; let view = table . view ( & ViewConfig :: default ( ) . as_jsvalue ( ) ? ) . await ? ; let csv = copy_async ( & view ) . await ? ; view . delete ( ) . await ? ; * csv_ref . borrow_mut ( ) = Some ( csv . as_string ( ) . unwrap ( ) ) ; Ok ( ( ) ) }
Copy a flat (unpivoted with all columns) CSV to the clipboard.
Copy a flat ( unpivoted with all columns ) CSV to the clipboard .
table
&JsPerspectiveTable