diff --git a/src/columnresizing.ts b/src/columnresizing.ts index cd9cc6f5..34458ac1 100644 --- a/src/columnresizing.ts +++ b/src/columnresizing.ts @@ -27,9 +27,9 @@ export type ColumnResizingOptions = { * Minimum width of a cell /column. The column cannot be resized smaller than this. */ cellMinWidth?: number; -/** - * The default minWidth of a cell / column when it doesn't have an explicit width (i.e.: it has not been resized manually) - */ + /** + * The default minWidth of a cell / column when it doesn't have an explicit width (i.e.: it has not been resized manually) + */ defaultCellMinWidth?: number; lastColumnResizable?: boolean; /** @@ -88,12 +88,7 @@ export function columnResizing({ handleDOMEvents: { mousemove: (view, event) => { - handleMouseMove( - view, - event, - handleWidth, - lastColumnResizable, - ); + handleMouseMove(view, event, handleWidth, lastColumnResizable); }, mouseleave: (view) => { handleMouseLeave(view); @@ -230,7 +225,12 @@ function handleMouseDown( if (!pluginState) return; if (pluginState.dragging) { const dragged = draggedWidth(pluginState.dragging, event, cellMinWidth); - displayColumnWidth(view, pluginState.activeHandle, dragged, defaultCellMinWidth); + displayColumnWidth( + view, + pluginState.activeHandle, + dragged, + defaultCellMinWidth, + ); } } diff --git a/src/tableview.ts b/src/tableview.ts index b9a51f77..c9c50f21 100644 --- a/src/tableview.ts +++ b/src/tableview.ts @@ -23,7 +23,12 @@ export class TableView implements NodeView { update(node: Node): boolean { if (node.type != this.node.type) return false; this.node = node; - updateColumnsOnResize(node, this.colgroup, this.table, this.defaultCellMinWidth); + updateColumnsOnResize( + node, + this.colgroup, + this.table, + this.defaultCellMinWidth, + ); return true; } @@ -68,7 +73,9 @@ export function updateColumnsOnResize( } else { if (nextDOM.style.width != cssWidth) { nextDOM.style.width = cssWidth; - nextDOM.style.minWidth = cssWidth.length ? '' : defaultCellMinWidth + 'px'; + nextDOM.style.minWidth = cssWidth.length + ? '' + : defaultCellMinWidth + 'px'; } nextDOM = nextDOM.nextSibling as HTMLElement; }