FIX: Add test for get_defined_name_list

Also uses the scope instead of the opaque sheet_id
This commit is contained in:
Nicolás Hatcher
2024-12-25 22:04:37 +01:00
committed by Nicolás Hatcher Andrés
parent 2ed5fb9bbc
commit 86213a8434
6 changed files with 92 additions and 12 deletions

View File

@@ -568,12 +568,11 @@ impl Model {
.get_defined_name_list()
.iter()
.map(|s| DefinedName {
name: s.name.to_string(),
scope: s.sheet_id,
formula: s.formula.to_string(),
name: s.0.to_owned(),
scope: s.1,
formula: s.2.to_owned(),
})
.collect();
// Ok(data)
serde_wasm_bindgen::to_value(&data).map_err(|e| to_js_error(e.to_string()))
}