@zambezi/grid
Advanced tools
Comparing version 0.17.0 to 0.18.0
@@ -30,3 +30,14 @@ ## Grid components | ||
### Manipulation of the components stack | ||
When you use `use` or `usePre`, you're just pushing components into an array of components. | ||
If you need to manipulate that array wholesale, you can inspect, modify or reassign the whole component list by using the `externalComponents` or `externalComponentsPre` getter / setters on the grid. | ||
``` | ||
grid.externalComponents() // => the current components | ||
grid.externalComponents([componentA, componentB]) // => overriding the current components | ||
``` | ||
#### Grid component events | ||
@@ -33,0 +44,0 @@ |
{ | ||
"name": "@zambezi/grid", | ||
"version": "0.17.0", | ||
"version": "0.18.0", | ||
"description": "D3 component for drawing financial grids.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -75,4 +75,4 @@ import { calculateColumnLayout } from './calculate-column-layout' | ||
.from(resize, 'wait:resizeWait') | ||
.from(runExternalComponents, 'use') | ||
.from(runExternalComponentsPre, 'use:usePre') | ||
.from(runExternalComponents, 'use', 'components:externalComponents') | ||
.from(runExternalComponentsPre, 'use:usePre', 'components:externalComponentsPre') | ||
.from(serverSideFilterAndSort, 'serverSideFilterAndSort') | ||
@@ -79,0 +79,0 @@ .from(setupTemplate, 'template') |
export function createRunExternalComponents() { | ||
const components = [] | ||
let components = [] | ||
@@ -9,2 +9,8 @@ function runExternalComponents(s) { | ||
runExternalComponents.components = function(value) { | ||
if (!arguments.length) return components | ||
components = value | ||
return runExternalComponents | ||
} | ||
runExternalComponents.use = function(component) { | ||
@@ -11,0 +17,0 @@ components.push(component) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
436407
5442