How to use the @talend/react-components/lib/Inject.getAll 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 / forms / src / UIForm / fields / Button / SingleButton.component.js View on Github external
render() {
		const { className, id, schema, getComponent } = this.props;
		const { type = 'button', title, label, inProgress, ...props } = schema;
		const Renderer = Inject.getAll(getComponent, { Action });
		return (
			
		);
	}
}
github Talend / ui / packages / forms / src / deprecated / Form.js View on Github external
export function renderActions(actions, handleActionClick, getComponent) {
	const Renderer = Inject.getAll(getComponent, { Action });
	if (actions) {
		return actions.map((action, index) => (
			
				{renderActionIcon(action.icon)}
				{action.label}
			
		));
	}
	return  {}} type="submit" label="Submit" />;
}
github Talend / ui / packages / forms / src / Form.js View on Github external
export function renderActions(actions, handleActionClick, getComponent) {
	const Renderer = Inject.getAll(getComponent, { Action });
	if (actions) {
		return actions.map((action, index) => (
			
				{renderActionIcon(action.icon)}
				{action.label}
			
		));
	}
	return  {}} type="submit" label="Submit" />;
}
github Talend / ui / packages / containers / src / HomeListView / HomeListView.component.js View on Github external
sidepanel,
	list,
	header,
	children,
}) {
	if (!sidepanel || !list) {
		return null;
	}
	let drawers = children || [];
	if (!Array.isArray(drawers)) {
		drawers = wrapChildren(drawers);
	}
	if (components && components.drawers) {
		drawers = drawers.concat(Inject.map(getComponent, components.drawers));
	}
	const Renderers = Inject.getAll(getComponent, { HeaderBar, SidePanel, List });

	return (
		
			{getContent(Renderers.List, list)}
		
	);
}