View
Defined in: js-api/src/views/view.ts:234
A view is typically docked in the main document area of the Grok platform. See [TableView], [SketchView], etc
Extends
Extended by
Constructors
Constructor
new View(
dart):View
Defined in: js-api/src/views/view.ts:240
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
View
Constructs
View
Overrides
Properties
| Property | Modifier | Type | Default value | Description | Overrides | Inherited from | Defined in |
|---|---|---|---|---|---|---|---|
_functions | protected | Func[] | [] | - | - | ViewBase._functions | js-api/src/widgets/base.ts:214 |
_name | protected | string | 'New View' | - | - | ViewBase._name | js-api/src/views/view.ts:106 |
_properties | protected | Property[] | [] | - | - | ViewBase._properties | js-api/src/widgets/base.ts:213 |
_root | protected | HTMLElement | undefined | - | - | ViewBase._root | js-api/src/u2core/component.ts:423 |
_u2 | readonly | ComponentState | undefined | - | - | ViewBase._u2 | js-api/src/u2core/component.ts:76 |
componentMeta? | public | ComponentMetaBase | undefined | The registry metadata of the tag that built this component, stamped by the spec renderer — the single source the introspection surface below is generated from. | - | ViewBase.componentMeta | js-api/src/u2core/component.ts:71 |
dart | public | any | undefined | - | - | ViewBase.dart | js-api/src/views/view.ts:46 |
factory | public | Func | null | null | Constructor function. No parameters, returns [Widget]. | - | ViewBase.factory | js-api/src/widgets/base.ts:211 |
isDetached | public | boolean | false | - | - | ViewBase.isDetached | js-api/src/widgets/base.ts:218 |
props | public | any | undefined | - | - | ViewBase.props | js-api/src/widgets/base.ts:215 |
specProps? | public | Record<string, unknown> | undefined | The props the registry's create was handed, stamped alongside componentMeta: the last resort of the property read below, for a component that keeps a prop under another name or not at all (a create wrapping a bare element). Construction-time values — a live one always wins. | - | ViewBase.specProps | js-api/src/u2core/component.ts:75 |
subs | public | Subscription[] | undefined | - | - | ViewBase.subs | js-api/src/views/view.ts:47 |
temp | public | any | undefined | Contains auxiliary information | ViewBase.temp | - | js-api/src/views/view.ts:237 |
ALL_VIEW_TYPES | readonly | string[] | undefined | - | - | - | js-api/src/views/view.ts:409 |
APPS | readonly | "apps" | 'apps' | - | - | - | js-api/src/views/view.ts:379 |
BROWSE | readonly | "browse" | 'browse' | - | - | - | js-api/src/views/view.ts:406 |
DATA_CONNECTIONS | readonly | "connections" | 'connections' | - | - | - | js-api/src/views/view.ts:393 |
DATA_JOB_RUNS | readonly | "jobs" | 'jobs' | - | - | - | js-api/src/views/view.ts:394 |
DATA_QUERY_RUNS | readonly | "queryruns" | 'queryruns' | - | - | - | js-api/src/views/view.ts:396 |
DATABASES | readonly | "databases" | 'databases' | - | - | - | js-api/src/views/view.ts:389 |
DOCKERS | readonly | "dockers" | 'dockers' | - | - | - | js-api/src/views/view.ts:407 |
EMAILS | readonly | "emails" | 'emails' | - | - | - | js-api/src/views/view.ts:397 |
FILES | readonly | "files" | 'files' | - | - | - | js-api/src/views/view.ts:395 |
FORUM | readonly | "forum" | 'forum' | - | - | - | js-api/src/views/view.ts:384 |
FUNCTIONS | readonly | "functions" | 'functions' | - | - | - | js-api/src/views/view.ts:392 |
GROUPS | readonly | "groups" | 'groups' | - | - | - | js-api/src/views/view.ts:398 |
HELP | readonly | "help" | 'help' | - | - | - | js-api/src/views/view.ts:387 |
JS_EDITOR | readonly | "js" | 'js' | - | - | - | js-api/src/views/view.ts:405 |
MODELS | readonly | "models" | 'models' | - | - | - | js-api/src/views/view.ts:399 |
NOTEBOOKS | readonly | "notebooks" | 'notebooks' | - | - | - | js-api/src/views/view.ts:386 |
OPEN_TEXT | readonly | "text" | 'text' | - | - | - | js-api/src/views/view.ts:388 |
PACKAGE_REPOSITORIES | readonly | "repositories" | 'repositories' | - | - | - | js-api/src/views/view.ts:404 |
PACKAGES | readonly | "packages" | 'packages' | - | - | - | js-api/src/views/view.ts:403 |
PROJECTS | readonly | "projects" | 'projects' | - | - | - | js-api/src/views/view.ts:385 |
QUERIES | readonly | "queries" | 'queries' | - | - | - | js-api/src/views/view.ts:400 |
SCRIPT | readonly | "script" | 'script' | - | - | - | js-api/src/views/view.ts:382 |
SCRIPTS | readonly | "scripts" | 'scripts' | - | - | - | js-api/src/views/view.ts:401 |
SETTINGS | readonly | "settings" | 'settings' | - | - | - | js-api/src/views/view.ts:380 |
SKETCH | readonly | "sketch" | 'sketch' | - | - | - | js-api/src/views/view.ts:383 |
USERS | readonly | "users" | 'users' | - | - | - | js-api/src/views/view.ts:402 |
VIEW_LAYOUTS | readonly | "layouts" | 'layouts' | - | - | - | js-api/src/views/view.ts:391 |
WEB_SERVICES | readonly | "webservices" | 'webservices' | - | - | - | js-api/src/views/view.ts:390 |
WELCOME | readonly | "welcome" | 'welcome' | - | - | - | js-api/src/views/view.ts:381 |
Accessors
aiDescription
Get Signature
get aiDescription():
string|null
Defined in: js-api/src/views/view.ts:248
AI briefing of the underlying view (widget-level on the Dart side). For a JS-defined view the Dart host forwards to the original ViewBase instance.
Returns
string | null
Set Signature
set aiDescription(
x):void
Defined in: js-api/src/views/view.ts:253
A short AI-facing briefing, seeded from the registry's usage or description.
Parameters
| Parameter | Type |
|---|---|
x | string | null |
Returns
void
Overrides
ambientAdoption
Get Signature
get
protectedambientAdoption():boolean
Defined in: js-api/src/widgets/base.ts:272
A widget wrapper minted inside somebody's effect scope must not be auto-disposed with it.
Returns
boolean
Inherited from
basePath
Get Signature
get basePath():
string
Defined in: js-api/src/views/view.ts:131
Deprecated
use path instead
Returns
string
Set Signature
set basePath(
s):void
Defined in: js-api/src/views/view.ts:132
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Inherited from
box
Get Signature
get box():
boolean
Defined in: js-api/src/views/view.ts:73
Returns
boolean
Set Signature
set box(
b):void
Defined in: js-api/src/views/view.ts:74
Parameters
| Parameter | Type |
|---|---|
b | boolean |
Returns
void
Inherited from
children
Get Signature
get children():
Widget<any>[]
Defined in: js-api/src/widgets/base.ts:304
Parent widget up the DOM tree, or null.
Returns
Widget<any>[]
Inherited from
closing
Get Signature
get closing():
boolean
Defined in: js-api/src/views/view.ts:149
Whether the view is currently closing.
Returns
boolean
Set Signature
set closing(
c):void
Defined in: js-api/src/views/view.ts:150
Parameters
| Parameter | Type |
|---|---|
c | boolean |
Returns
void
Inherited from
description
Get Signature
get description():
string
Defined in: js-api/src/views/view.ts:323
View description. Used in UI and AI.
Returns
string
Set Signature
set description(
s):void
Defined in: js-api/src/views/view.ts:324
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Overrides
entity
Get Signature
get entity():
object|null
Defined in: js-api/src/views/view.ts:127
Returns
object | null
Set Signature
set entity(
_e):void
Defined in: js-api/src/views/view.ts:128
Parameters
| Parameter | Type |
|---|---|
_e | object | null |
Returns
void
Inherited from
helpUrl
Get Signature
get helpUrl():
string|null
Defined in: js-api/src/views/view.ts:327
Returns
string | null
View help URL.
Set Signature
set helpUrl(
url):void
Defined in: js-api/src/views/view.ts:328
Parameters
| Parameter | Type |
|---|---|
url | string | null |
Returns
void
View help URL.
Overrides
id
Get Signature
get id():
string
Defined in: js-api/src/views/view.ts:318
Returns
string
isPinned
Get Signature
get isPinned():
boolean
Defined in: js-api/src/views/view.ts:331
Whether the view is pinned. Pinned views are not closed when a new view is opened.
Returns
boolean
Set Signature
set isPinned(
value):void
Defined in: js-api/src/views/view.ts:332
Parameters
| Parameter | Type |
|---|---|
value | boolean |
Returns
void
jsView
Get Signature
get jsView():
ViewBase|null
Defined in: js-api/src/views/view.ts:262
The original JS ViewBase instance when this view hosts a JS-defined view
(e.g. a plugin app view), null for native Dart views. Lets callers reach the actual
view class (its methods, tools, state) from grok.shell.v.
Returns
ViewBase | null
name
Get Signature
get name():
string
Defined in: js-api/src/views/view.ts:361
View name. It gets shown in the tab handle.
Returns
string
Set Signature
set name(
s):void
Defined in: js-api/src/views/view.ts:366
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Overrides
parent
Get Signature
get parent():
Widget<any> |null
Defined in: js-api/src/widgets/base.ts:301
Parent widget up the DOM tree, or null.
Returns
Widget<any> | null
Inherited from
parentCall
Get Signature
get parentCall():
FuncCall|undefined
Defined in: js-api/src/views/view.ts:118
Returns
FuncCall | undefined
Set Signature
set parentCall(
s):void
Defined in: js-api/src/views/view.ts:119
Parameters
| Parameter | Type |
|---|---|
s | FuncCall | undefined |
Returns
void
Inherited from
parentView
Get Signature
get parentView():
ViewBase
Defined in: js-api/src/views/view.ts:121
Returns
Set Signature
set parentView(
s):void
Defined in: js-api/src/views/view.ts:122
Parameters
| Parameter | Type |
|---|---|
s | ViewBase |
Returns
void
Inherited from
path
Get Signature
get path():
string
Defined in: js-api/src/views/view.ts:176
View URI, relative to the view root
Returns
string
Set Signature
set path(
s):void
Defined in: js-api/src/views/view.ts:177
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Inherited from
propertyTarget
Get Signature
get propertyTarget():
unknown
Defined in: js-api/src/u2core/component.ts:228
What this component's properties are read from and written to — prop.get(target) /
prop.set(target, v): the component itself, unless an adoption says otherwise.
Returns
unknown
Inherited from
propertyTier
Get Signature
get propertyTier():
boolean
Defined in: js-api/src/widgets/base.ts:276
Every property getProperties declares is a bind step, read and written on propertyTarget.
Returns
boolean
Inherited from
ribbonMenu
Get Signature
get ribbonMenu():
Menu
Defined in: js-api/src/views/view.ts:141
View menu. Sample: https://public.datagrok.ai/js/samples/ui/views/ribbon
Returns
Set Signature
set ribbonMenu(
menu):void
Defined in: js-api/src/views/view.ts:142
Parameters
| Parameter | Type |
|---|---|
menu | Menu |
Returns
void
Inherited from
root
Get Signature
get root():
HTMLElement
Defined in: js-api/src/views/view.ts:310
Returns the content (visual root) of this view.
Returns
HTMLElement
Overrides
scope
Get Signature
get scope():
Scope
Defined in: js-api/src/u2core/component.ts:53
Minted on first use; assigned before _scopeMinted fires, so the hook's own
this.scope.own(...) reads the stored scope instead of re-entering the mint.
Returns
Inherited from
statusBarPanels
Get Signature
get statusBarPanels():
HTMLDivElement[]
Defined in: js-api/src/views/view.ts:145
Status bar panels to be shown on the bottom
Returns
HTMLDivElement[]
Set Signature
set statusBarPanels(
panels):void
Defined in: js-api/src/views/view.ts:146
Parameters
| Parameter | Type |
|---|---|
panels | HTMLDivElement[] |
Returns
void
Inherited from
toolbox
Get Signature
get toolbox():
HTMLElement
Defined in: js-api/src/views/view.ts:136
View toolbox. Sample: https://public.datagrok.ai/js/samples/ui/views/toolbox
Returns
HTMLElement
Set Signature
set toolbox(
x):void
Defined in: js-api/src/views/view.ts:137
Parameters
| Parameter | Type |
|---|---|
x | HTMLElement |
Returns
void
Inherited from
type
Get Signature
get type():
string
Defined in: js-api/src/views/view.ts:314
View type
Returns
string
Overrides
Methods
_notifyPropertyChange()
protected_notifyPropertyChange(p):void
Defined in: js-api/src/widgets/base.ts:351
Notifies the property tier. Called from both the addProperty setter (overrides that skip
super would otherwise lose props.x = writes) and onPropertyChanged (direct calls);
the double notify collapses into one microtask refresh.
Parameters
| Parameter | Type |
|---|---|
p | Property | null |
Returns
void
Inherited from
ViewBase._notifyPropertyChange
_onAdded()
_onAdded():
void
Defined in: js-api/src/views/view.ts:374
Returns
void
_ownPropertyChanges()
protected_ownPropertyChanges():ObservableLike<PropertyChange>
Defined in: js-api/src/widgets/base.ts:356
Returns
ObservableLike<PropertyChange>
Inherited from
_scopeMinted()
protected_scopeMinted(_scope):void
Defined in: js-api/src/widgets/base.ts:320
First-mint hook: a platform descendant wires its lifecycle here. Never fired for a scope provided to init — that path runs inside the constructor chain.
Parameters
| Parameter | Type |
|---|---|
_scope | Scope |
Returns
void
Inherited from
_wireDartLifecycle()
protected_wireDartLifecycle():void
Defined in: js-api/src/widgets/base.ts:336
Dart-owned lifecycle: the platform kill disposes the scope, and disposing the scope kills the widget through the kill-walk.
Returns
void
Inherited from
_wireJsLifecycle()
protected_wireJsLifecycle():void
Defined in: js-api/src/widgets/base.ts:327
JS-owned lifecycle: disposing the scope detaches the widget, and vice versa.
Returns
void
Inherited from
_wireLifecycle()
protected_wireLifecycle():void
Defined in: js-api/src/widgets/base.ts:322
Returns
void
Inherited from
acceptsPath()
acceptsPath(
_urlPath):boolean
Defined in: js-api/src/views/view.ts:201
Checks if URL path is acceptable. Override in subclasses.
[_urlPath] is the path WITHOUT the query string: a view claims a URL by its path, and decides what the parameters mean in handlePath.
Parameters
| Parameter | Type |
|---|---|
_urlPath | string |
Returns
boolean
"true" if path is acceptable, "false" otherwise.
Inherited from
afterPersist()
protectedafterPersist():void
Defined in: js-api/src/views/view.ts:99
Gets called automatically when this view gets pinned
Returns
void
Inherited from
append()
append(
item):HTMLElement
Defined in: js-api/src/views/view.ts:206
Appends an item to this view. Use appendAll for appending multiple elements.
Parameters
| Parameter | Type | Description |
|---|---|---|
item | any | - |
Returns
HTMLElement
Inherited from
appendAll()
appendAll(
items):HTMLElement
Defined in: js-api/src/views/view.ts:213
Appends multiple elements this view. Use append for appending a single element.
Parameters
| Parameter | Type | Description |
|---|---|---|
items | HTMLElement[] | - |
Returns
HTMLElement
Inherited from
apply()
apply(
properties):Widget
Defined in: js-api/src/widgets/base.ts:261
Parameters
| Parameter | Type | Description |
|---|---|---|
properties | object | - |
Returns
Inherited from
bindProps()
bindProps():
BindProp[]
Defined in: js-api/src/u2core/component.ts:285
The signal-backed subset of the meta props — what a binding picker offers on a named node — plus, under propertyTier, every declared property. Allocates no signal.
Returns
BindProp[]
Inherited from
bindStep()
bindStep(
name):BindSource|Signal<unknown> |null
Defined in: js-api/src/u2core/component.ts:274
One binding step (DD5): a meta-declared prop's same-named Signal member — a named node is a
bind source, generated off componentMeta the way getProperties is — then, under
propertyTier, a cached signal over the declared property. '' answers the default
binding: the component's own value signal, where one exists.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
BindSource | Signal<unknown> | null
Inherited from
close()
close():
void
Defined in: js-api/src/views/view.ts:223
Closes this view.
Returns
void
Inherited from
detach()
detach():
void
Defined in: js-api/src/views/view.ts:218
Detaches this view.
Returns
void
Inherited from
dispose()
dispose():
void
Defined in: js-api/src/u2core/component.ts:141
On a never-engaged wrapper the getter mints here and _scopeMinted wires the
lifecycle (own(kill) + the platform cleanup for Dart-owned), so dispose still kills it;
re-entry from the kill cleanup is a no-op via the scope's disposed flag.
Returns
void
Inherited from
effect()
effect(
fn):this
Defined in: js-api/src/u2core/component.ts:128
Parameters
| Parameter | Type |
|---|---|
fn | () => void |
Returns
this
Inherited from
fireEvent()
protectedfireEvent(eventId,args?):void
Defined in: js-api/src/u2core/component.ts:413
Parameters
| Parameter | Type |
|---|---|
eventId | string |
args? | unknown |
Returns
void
Inherited from
getDartProperties()
getDartProperties():
any[]
Defined in: js-api/src/widgets/base.ts:289
Returns
any[]
Inherited from
getFunctions()
getFunctions():
Func[]
Defined in: js-api/src/views/view.ts:307
Functions applicable to this view. Override in subclasses to return the view's
registered package functions — each typically takes the generic view argument
and reaches this instance through view.jsView. The Dart JsViewHost forwards its
own getFunctions() here, so callers holding grok.shell.v see these functions.
Returns
Func[]
Overrides
getIcon()
getIcon():
HTMLElement|null
Defined in: js-api/src/views/view.ts:165
Returns
HTMLElement | null
View icon. Override in subclasses.
Inherited from
getInfo()
getInfo():
ViewLayout
Defined in: js-api/src/views/view.ts:355
Saves view as a ViewInfo. Only applicable to certain views, such as TableView.
Returns
getProperties()
getProperties():
Property[]
Defined in: js-api/src/views/view.ts:306
Returns all properties of this widget: the meta-generated ones plus addProperty's.
Returns
Property[]
Overrides
getRibbonPanels()
getRibbonPanels():
HTMLElement[][]
Defined in: js-api/src/views/view.ts:160
Returns
HTMLElement[][]
Inherited from
getWidgetStatus()
getWidgetStatus():
IWidgetStatus
Defined in: js-api/src/widgets/base.ts:422
Returns the widget's runtime structure for automated testing and introspection.
Returns
Inherited from
handlePath()
handlePath(
_urlPath):void
Defined in: js-api/src/views/view.ts:194
Handles URL path. Override in subclasses.
[_urlPath] is the path WITHOUT the query string (see acceptsPath);
the router has already updated the address bar, so read the parameters from
window.location.search.
A handler may route elsewhere — set grok.shell.v to another view and the
router leaves it alone (it only falls back to this view when the handler
changed nothing).
Parameters
| Parameter | Type |
|---|---|
_urlPath | string |
Returns
void
Inherited from
link()
link(
name,source,twoWay):void
Defined in: js-api/src/u2core/component.ts:246
Keeps this component's name step and source equal, echo-suppressed by value; the reverse
direction only where twoWay. A component that took source as its own signal needs no link
and gets none; a read-only step cannot follow anything and gets none either.
Parameters
| Parameter | Type |
|---|---|
name | string |
source | Signal<unknown> |
twoWay | boolean |
Returns
void
Inherited from
loadLayout()
loadLayout(
layout,pickupColumnTags?):void
Defined in: js-api/src/views/view.ts:340
Loads previously saved view layout. Only applicable to certain views, such as TableView. See also saveLayout
Parameters
| Parameter | Type |
|---|---|
layout | ViewLayout |
pickupColumnTags? | boolean |
Returns
void
loadStateMap()
loadStateMap(
_stateMap):void
Defined in: js-api/src/views/view.ts:173
Loads view state map. Override in subclasses.
Parameters
| Parameter | Type |
|---|---|
_stateMap | object |
Returns
void
Inherited from
onEvent()
onEvent(
eventId?):Observable<any>
Defined in: js-api/src/widgets/base.ts:419
Observes events with the specified eventId. Override in subclasses to provide actual events.
Parameters
| Parameter | Type | Default value |
|---|---|---|
eventId | string | null | null |
Returns
Observable<any>
Inherited from
onFrameAttached()
onFrameAttached(
dataFrame):void
Defined in: js-api/src/widgets/base.ts:295
Parameters
| Parameter | Type |
|---|---|
dataFrame | DataFrame |
Returns
void
Inherited from
onPropertyChanged()
onPropertyChanged(
property):void
Defined in: js-api/src/widgets/base.ts:287
Gets called when viewer's property is changed.
Parameters
| Parameter | Type | Description |
|---|---|---|
property | Property | null | or null, if multiple properties were changed. |
Returns
void
Inherited from
own()
own(
dispose):this
Defined in: js-api/src/u2core/component.ts:133
Parameters
| Parameter | Type |
|---|---|
dispose | () => void |
Returns
this
Inherited from
pin()
pin():
void
Defined in: js-api/src/views/view.ts:335
Pins the view. Pinned views are not closed when a new view is opened.
Returns
void
propertyChanges()
protectedpropertyChanges():ObservableLike<PropertyChange>
Defined in: js-api/src/widgets/base.ts:366
What refreshes the property tier's cached signals from outside: null where nothing announces a change (one-way).
Returns
ObservableLike<PropertyChange>
Inherited from
registerFunction()
protectedregisterFunction(f):void
Defined in: js-api/src/u2core/component.ts:409
Parameters
| Parameter | Type |
|---|---|
f | FuncLike |
Returns
void
Inherited from
run()
run<
T>(fn):T
Defined in: js-api/src/u2core/component.ts:124
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
fn | () => T |
Returns
T
Inherited from
saveLayout()
saveLayout(
options?):ViewLayout
Defined in: js-api/src/views/view.ts:348
Saves view layout as a string. Only applicable to certain views, such as TableView. See also loadLayout
Parameters
| Parameter | Type |
|---|---|
options? | { saveWithData?: boolean; } |
options.saveWithData? | boolean |
Returns
saveStateMap()
saveStateMap():
object|null
Defined in: js-api/src/views/view.ts:170
Returns
object | null
Viewer state map. Override in subclasses.
Inherited from
setIcon()
setIcon(
icon):void
Defined in: js-api/src/views/view.ts:167
Parameters
| Parameter | Type |
|---|---|
icon | HTMLElement |
Returns
void
Inherited from
setRibbonPanels()
setRibbonPanels(
panels,clear?):void
Defined in: js-api/src/views/view.ts:156
Sets custom view panels on the ribbon.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
panels | HTMLElement[][] | undefined | - |
clear | boolean | true | Clear all previous before setup Sample: https://public.datagrok.ai/js/samples/ui/views/ribbon |
Returns
void
Inherited from
sourceRowsChanged()
sourceRowsChanged():
void
Defined in: js-api/src/widgets/base.ts:293
Returns
void
Inherited from
sub()
sub(
subscription):void
Defined in: js-api/src/widgets/base.ts:254
Registers a subscription to an external event.
Parameters
| Parameter | Type | Description |
|---|---|---|
subscription | Subscription | - |
Returns
void
Inherited from
toDart()
toDart():
any
Defined in: js-api/src/widgets/base.ts:246
Returns
any
Inherited from
build()
staticbuild(builder):Control
Defined in: js-api/src/u2core/component.ts:470
Builds a control out of plain elements: builder runs with the new control's scope
ambient, so signal bindings and nested components inside it are owned by the result.
The ambient scope only spans the synchronous part of builder — components constructed after
an await inside it are adopted by nobody and must be disposed by hand, or constructed before
the first await.
Parameters
| Parameter | Type |
|---|---|
builder | () => HTMLElement | (string | HTMLElement | Control)[] |
Returns
Inherited from
create()
staticcreate(options?):View
Defined in: js-api/src/views/view.ts:290
Creates a new empty view.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | string | { } | null | - |
Returns
View
createByType()
staticcreateByType(viewType,options?):View
Defined in: js-api/src/views/view.ts:298
Creates one of the standard views based on the view type (such as 'functions')
Parameters
| Parameter | Type |
|---|---|
viewType | string |
options? | any |
Returns
View
find()
staticfind(root):Widget<any> |null
Defined in: js-api/src/widgets/base.ts:236
Finds existing widget from its visual root.
Parameters
| Parameter | Type |
|---|---|
root | Element |
Returns
Widget<any> | null
Inherited from
forObject()
staticforObject(x):View|null
Defined in: js-api/src/views/view.ts:276
Creates a view for the specified object, if it is registered, or null otherwise.
Parameters
| Parameter | Type |
|---|---|
x | any |
Returns
View | null
fromDart()
staticfromDart(dart):TableView|View
Defined in: js-api/src/views/view.ts:267
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
TableView | View
fromRoot()
staticfromRoot(root):View
Defined in: js-api/src/views/view.ts:281
Creates and returns a view with the specified element inside.
Parameters
| Parameter | Type |
|---|---|
root | HTMLElement |
Returns
View
Overrides
fromViewAsync()
staticfromViewAsync(getViewAsync,ribbon?):any
Defined in: js-api/src/views/view.ts:302
Parameters
| Parameter | Type | Default value |
|---|---|---|
getViewAsync | () => Promise<View> | undefined |
ribbon | boolean | true |
Returns
any
getAll()
staticgetAll():Widget<any>[]
Defined in: js-api/src/widgets/base.ts:231
Returns all currently active widgets.
Returns
Widget<any>[]
Inherited from
init()
staticinit(self,scope?):void
Defined in: js-api/src/u2core/component.ts:83
Per-instance state, for a constructed component and for an adopted platform object alike.
Parameters
| Parameter | Type |
|---|---|
self | Component |
scope? | Scope |
Returns
void
Inherited from
is()
staticis(x):x is Control
Defined in: js-api/src/u2core/component.ts:439
Structural probe by methods only — never .scope: the accessor mints.
Parameters
| Parameter | Type |
|---|---|
x | unknown |
Returns
x is Control
Inherited from
registerCleanup()
staticregisterCleanup(element,cleanup):void
Defined in: js-api/src/widgets/base.ts:242
Registers a cleanup function to run when [element] is killed — i.e. when its host view or pane closes. Also marks the element so the kill-walk can find it.
Parameters
| Parameter | Type |
|---|---|
element | Element |
cleanup | Function |
Returns
void
Inherited from
sameValue()
staticsameValue(a,b):boolean
Defined in: js-api/src/u2core/component.ts:105
The equality the property tier and link suppress echoes by: Object.is, arrays
element-wise, plain objects key-wise (recursive), everything else by identity.
Parameters
| Parameter | Type |
|---|---|
a | unknown |
b | unknown |
Returns
boolean