Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions packages/ketchup/src/f-components/f-cell/f-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const FCell: FunctionalComponent<FCellProps> = (
content = setEditableCell(cellType, classObj, cell, column, props);
} else if (cell.data && kupTypes.includes(cellType)) {
if (props.setSizes) {
setCellSizeKup(cellType, subcomponentProps, cell);
setCellSizeKup(cellType, subcomponentProps, cell, column);
}
if (!props.renderKup) {
const lazyClass = 'cell-' + cellType + ' placeholder';
Expand Down Expand Up @@ -295,7 +295,11 @@ const handleMouseEnter = (

const handleMouseLeave = (event: MouseEvent) => {
const parent = event.currentTarget as HTMLElement;
const iconContainer = parent.querySelector('kup-image');
// only remove the action icon we added on mouse enter, not the first
// kup-image in the cell (which might be the BAR/IMAGE itself)
const iconContainer = parent.querySelector(
'kup-image.f-cell__iconfunction'
);

if (iconContainer) {
iconContainer.remove();
Expand Down Expand Up @@ -607,13 +611,17 @@ function setCellSize(
function setCellSizeKup(
cellType: string,
subcomponentProps: unknown,
cell: KupDataCell
cell: KupDataCell,
column: KupDataColumn
) {
switch (cellType) {
case FCellTypes.BAR:
if (!(subcomponentProps as FImageProps).sizeY) {
(subcomponentProps as FImageProps).sizeY = '26px';
}
if (!(subcomponentProps as FImageProps).sizeX && column.size) {
(subcomponentProps as FImageProps).sizeX = column.size;
}
break;
case FCellTypes.BUTTON:
let height: string = '';
Expand Down