igniteui-react-grids
Version:
Ignite UI React grid components.
47 lines (46 loc) • 1.63 kB
JavaScript
import * as React from 'react';
import { IgrBaseToolbarDirective } from "./igr-base-toolbar-directive";
import { BaseToolbarColumnActionsDirective } from "./BaseToolbarColumnActionsDirective";
import { isValidProp } from "igniteui-react-core";
export class IgrBaseToolbarColumnActionsDirective extends IgrBaseToolbarDirective {
createImplementation() {
return new BaseToolbarColumnActionsDirective();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor(props) {
super(props);
}
render() {
const nativePropsName = Object.keys(this.props).filter(prop => !isValidProp(this, prop) && prop !== "originalRef" && prop !== "className");
const nativeProps = {};
nativePropsName.forEach(propName => {
nativeProps[propName] = this.props[propName];
});
let propChildren = this.props.children;
let children = [];
React.Children.forEach(propChildren, (ch) => {
children.push(React.cloneElement(ch));
});
this._portalManager.onRender(children);
let style = {};
if (this.props.style) {
style = this.props.style;
}
let div = React.createElement("", Object.assign(Object.assign({}, nativeProps), { ref: this._getMainRef, class: this.props.className, style: style, children: children }));
return div;
}
_getMainRef(ref) {
this._elRef = ref;
}
get name() {
return this.i.a;
}
set name(v) {
this.i.a = v;
}
}