All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.js.components.table.Table.js Maven / Gradle / Ivy

/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */

import {ClayCheckbox} from '@clayui/form';
import ClayTable from '@clayui/table';
import {sub} from 'frontend-js-web';
import React from 'react';

import DropDown from './DropDown';

const CellWrapper = ({children, colSpan = 1, fieldAlign, index}) => (
	 0 && 'table-cell-expand-smaller'}
		colSpan={colSpan}
		expanded={index === 0}
		headingTitle={index === 0}
		key={index}
	>
		{children}
	
);

const Table = ({
	actions,
	align = 'left',
	checkable,
	columns,
	forwardRef,
	items,
	noActionsMessage,
}) => {
	return (
		
{checkable && ( )} {columns.map((column, index) => ( 0 && 'table-cell-expand-smaller' } expanded={index === 0} headingCell key={index} > {column.value} ))} {actions && ( )} {items.map((item, index) => ( {checkable && ( {}} /> )} {columns.map((column, index) => ( {item[column.key]} ))} {actions && ( )} ))}
); }; export default React.forwardRef((props, ref) => ( ));