Name | Type | Default |
---|---|---|
animationType | DropDownButtonAnimationType | 'slide' |
DropDownButtonAnimationType: "none" | "slide" | "fade"
Sets or gets the type of the animation. Possible Values:
/* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} animationType={'fade'}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
arrowSize | number | 16 |
Sets or gets the width of the arrow element.
/* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} arrowSize={20}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
autoOpen | boolean | false |
Sets or gets whether the DropDown is automatically opened when the mouse cursor is moved over the widget. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} autoOpen={true}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
closeDelay | number | 400 |
Sets or gets the delay of the 'close' animation. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} closeDelay={800}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
disabled | boolean | false |
Enables or disables the dropDownButton. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} disabled={true}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
dropDownHorizontalAlignment | DropDownButtonHorizontalAlignment | 'left' |
DropDownButtonHorizontalAlignment: "left" | "right"
Sets or gets the DropDown's alignment. Possible values:
/* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} dropDownHorizontalAlignment={'right'}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
dropDownVerticalAlignment | DropDownButtonVerticalAlignment | 'bottom' |
DropDownButtonVerticalAlignment: "top" | "bottom"
Sets or gets the DropDown's alignment. Possible Values:
/* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} dropDownVerticalAlignment={'bottom'}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
dropDownWidth | number | string | null |
Sets or gets the dropdownbutton popup width.
/* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} dropDownWidth={500}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
enableBrowserBoundsDetection | boolean | false |
When this property is set to true, the popup may open above the button, if there's not enough available space below the button. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} enableBrowserBoundsDetection={true}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
height | string | number | null |
Sets or gets the button's height. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} height={40}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
initContent | () => void | null |
Function, called after the first open of the dropdown button popup. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} initContent={this.state.initContent}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
openDelay | number | 350 |
Sets or gets the delay of the 'open' animation. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} openDelay={1000}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
popupZIndex | number | 20000 |
Sets or gets the popup's z-index. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} popupZIndex={9999}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
rtl | boolean | false |
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} rtl={true}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
template | DropDownButtonTemplate | 'default' |
DropDownButtonTemplate: "default" | "primary" | "success" | "warning" | "danger" | "info"
Determines the template as an alternative of the default styles. Possible Values:
/* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} template={'success'}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
theme | string | '' |
/* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} theme={'material'}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
width | string | number | null |
Sets or gets the button's width. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} width={400}> <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
Events |
||
close | Event | |
This event is triggered when the button's popup is closed. Code examples
Bind to the
/* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} onClose={this.onClose} > <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } private onClose(e: Event): void { alert('do something...'); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
open | Event | |
This event is triggered when the button's popup is opened. Code examples
Bind to the
/* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} onOpen={this.onOpen} > <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } private onOpen(e: Event): void { alert('do something...'); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
Methods |
||
Name | Arguments | Return Type |
close | None | |
Hides the button's content. |
||
destroy | None | |
Destroys the widget. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); this.myDropDownButton.current!.destroy(); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} > <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
focus | None | |
Focuses the widget. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); this.myDropDownButton.current!.focus(); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} > <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
getContent | None | |
Gets the button's content. The returned value is the button's content set through the "setContent" method. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); this.myDropDownButton.current!.getContent(); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} > <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
isOpened | None | |
Returns true, if the drop down is opened. Otherwise returns false. /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); this.myDropDownButton.current!.isOpened(); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} > <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
open | None | |
Shows the button's content. |
||
setContent | content | |
Sets the button's content. The parameter could be a "string" or "html". /* CSSStylesheet.css */ .jqx-tree { border: none; } /* End CSSStylesheet.css */ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import './CSSStylesheet.css'; import JqxDropDownButton, { IDropDownButtonProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownbutton'; import JqxTree, { ITreeProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtree'; class App extends React.PureComponent<{}, IDropDownButtonProps> { private myDropDownButton = React.createRef<JqxDropDownButton>(); constructor(props: {}) { super(props); } public componentDidMount(): void { this.myDropDownButton.current!.setContent(`<div style='position: relative; margin-left: 3px; margin-top: 4px;'>Home</div>`); this.myDropDownButton.current!.setContent('New Content!'); } public render() { return ( <JqxDropDownButton ref={this.myDropDownButton} > <jqxTree ref='myTree' @select='myTreeOnSelect($event)' :width='200'> <ul> <li item-selected='true'>Home</li> <li item-expanded='true'> Solutions <ul> <li>Education</li> <li>Financial services</li> <li>Government</li> <li>Manufacturing</li> </ul> </li> <li> Products <ul> <li>PC products</li> <li>Mobile products</li> <li>All products</li> </ul> </li> </ul> </jqxTree> </JqxDropDownButton> ); } private myTreeOnSelect(event) { const item = this.myTree.getItem(event.args.element); const dropDownContent = `<div style='position: relative; margin-left: 3px; margin-top: 4px;'>` + item.label + `</div>`; this.myDropDownButton.current!.setContent(dropDownContent); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |