@omegagrid/tree
Advanced tools
Comparing version 0.4.22 to 0.4.23
@@ -5,2 +5,3 @@ import { CommonOptions } from "@omegagrid/core"; | ||
import { TemplateResult } from "lit-html"; | ||
import { CSSResultOrNative } from "lit"; | ||
export type Options = { | ||
@@ -26,2 +27,3 @@ alwaysRefresh?: boolean; | ||
itemTypeOptions?: Record<string, ItemTypeOptions>; | ||
customStyle?: CSSResultOrNative | string | (CSSResultOrNative | string)[]; | ||
nodeRenderer?: (div: HTMLDivElement, node: NodeModel) => string | TemplateResult<1> | void; | ||
@@ -28,0 +30,0 @@ afterRenderer?: (div: HTMLDivElement, node: NodeModel) => void; |
@@ -73,2 +73,3 @@ import { List, log, ListPointerEvent } from '@omegagrid/core'; | ||
_onListMenu: (e: ListPointerEvent) => void; | ||
get itemStyle(): (string | import("lit").CSSResultOrNative)[]; | ||
render(): Iterable<string | import("lit-html").TemplateResult<1>>; | ||
@@ -75,0 +76,0 @@ renderItems(all?: boolean): void; |
@@ -314,2 +314,7 @@ "use strict"; | ||
} | ||
get itemStyle() { | ||
var _a; | ||
const customStyle = (_a = this.options) === null || _a === void 0 ? void 0 : _a.customStyle; | ||
return [tree_style_1.itemStyle, ...(customStyle ? (Array.isArray(customStyle) ? customStyle : [customStyle]) : [])]; | ||
} | ||
render() { | ||
@@ -322,3 +327,3 @@ var _a, _b, _c; | ||
size="${this.size}" | ||
.customStyle=${tree_style_1.itemStyle} | ||
.customStyle=${this.itemStyle} | ||
?nativeHeight="${!this.maxHeight}" | ||
@@ -325,0 +330,0 @@ maxHeight="${this.maxHeight || null}" |
{ | ||
"name": "@omegagrid/tree", | ||
"version": "0.4.22", | ||
"version": "0.4.23", | ||
"license": "UNLICENSED", | ||
@@ -30,4 +30,4 @@ "description": "Universal treeview component", | ||
"dependencies": { | ||
"@omegagrid/core": "^0.4.22", | ||
"@omegagrid/localize": "^0.4.22", | ||
"@omegagrid/core": "^0.4.23", | ||
"@omegagrid/localize": "^0.4.23", | ||
"date-fns": "^3.2.0", | ||
@@ -34,0 +34,0 @@ "lit": "^3.1.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
179843
2552
Updated@omegagrid/core@^0.4.23
Updated@omegagrid/localize@^0.4.23