* Added generic relation cell * Deactivated debug * Added default warning * Put back display component * Removed unused types * wip * Renamed to view field * Use new view field structure to have chip working * Finished * Added a temp feature flag * Added double text chip cell * Ok * Finished tables * Fixed icon size * Fixed bug on date field * Use icon index * Fix * Fixed naming * Fix * removed file from merge * Fixed tests * Coverage
43 lines
1018 B
TypeScript
43 lines
1018 B
TypeScript
import { useRecoilValue } from 'recoil';
|
|
|
|
import { viewFieldsFamilyState } from '../states/viewFieldsState';
|
|
|
|
import { ColumnHead } from './ColumnHead';
|
|
import { SelectAllCheckbox } from './SelectAllCheckbox';
|
|
|
|
export function EntityTableHeader() {
|
|
const viewFields = useRecoilValue(viewFieldsFamilyState);
|
|
|
|
return (
|
|
<thead>
|
|
<tr>
|
|
<th
|
|
style={{
|
|
width: 30,
|
|
minWidth: 30,
|
|
maxWidth: 30,
|
|
}}
|
|
>
|
|
<SelectAllCheckbox />
|
|
</th>
|
|
{viewFields.map((viewField) => (
|
|
<th
|
|
key={viewField.columnOrder.toString()}
|
|
style={{
|
|
width: viewField.columnSize,
|
|
minWidth: viewField.columnSize,
|
|
maxWidth: viewField.columnSize,
|
|
}}
|
|
>
|
|
<ColumnHead
|
|
viewName={viewField.columnLabel}
|
|
viewIcon={viewField.columnIcon}
|
|
/>
|
|
</th>
|
|
))}
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
);
|
|
}
|