This repository has been archived by the owner on Mar 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
ViewUtil
Rickard Hansson edited this page Jul 16, 2019
·
9 revisions
The Dashboard object exposes a ViewUtil class. You can access it like this:
const ViewUtil = Dashboard.ViewUtil
<ViewUtil.EnhanceWithClickOutside handleClickOutside={(event) => {}} />
Attr | Type | Default | Description |
---|---|---|---|
handleClickOutside |
function | null | callback when a click outside is triggered |
class MyComponent extends Dashboard.Application {
render() {
return (
<ViewUtil.Scrollable>
...
</ViewUtil.Scrollable>
)
}
}
Attr | Type | Default | Description |
---|---|---|---|
children |
react elemnts | null | React elemnts to render them inside Portal |
domNode |
doomNode element | null | domNode element to render the children inside it |
const ViewUtil = Dashboard.ViewUtil
class MyComponent extends Dashboard.Application {
render() {
return (
ViewUtil.Portal(
children,
domNode
)
)
}
}
<ViewUtil.QueryEventWrapper qsInstance={this.qsInstance} search={"query"} onStreamEvent={(event) => {}}>
<ChildComponent/>
</ViewUtil.QueryEventWrapper>
- <ViewUtil.QueryEventWrapper qsInstance={this.qsInstance} search={"query"}>
- <ChildComponent /> //child component need to implement the onStreamEvent function
- </ViewUtil.QueryEventWrapper>
Attr | Type | Default | Description |
---|---|---|---|
qsInstance |
object | null | a instance of LCC QueryStreamer object |
search |
string | null | a valid OC query to listen for events on |
onStreamEvent |
function | null | callback when a event has occurred |