How to use the @talend/react-components/lib/Inject.get function in @talend/react-components

To help you get started, we’ve selected a few @talend/react-components examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Talend / ui / packages / datagrid / src / components / DataGrid / DataGrid.component.js View on Github external
export function injectedCellRenderer(getComponent, cellRenderer, avroRenderer) {
	const Component = Inject.get(getComponent, cellRenderer, DefaultCellRenderer);

	return props => ;
}
github Talend / ui / packages / datagrid / src / components / DataGrid / DataGrid.component.js View on Github external
}

		agGridOptions.columnDefs = adaptedColumnDefs;
		agGridOptions.frameworkComponents = {
			[CELL_RENDERER_COMPONENT]: injectedCellRenderer(
				this.props.getComponent,
				this.props.cellRenderer,
				getAvroRenderer(this.props.avroRenderer),
			),
			[HEADER_RENDERER_COMPONENT]: injectedHeaderRenderer(
				this.props.getComponent,
				this.props.headerRenderer,
				this.onFocusedColumn,
				this.onKeyDownHeaderColumn,
			),
			[PIN_HEADER_RENDERER_COMPONENT]: Inject.get(
				this.props.getComponent,
				this.props.pinHeaderRenderer,
				DefaultPinHeaderRenderer,
			),
		};

		return agGridOptions;
	}
github Talend / ui / packages / datagrid / src / components / DataGrid / DataGrid.component.js View on Github external
export function injectedHeaderRenderer(getComponent, headerRenderer, onFocusedColumn, onKeyDown) {
	const Component = Inject.get(getComponent, headerRenderer, DefaultHeaderRenderer);

	return props => ;
}