handle_cell_click(e, index, j)} on:contextmenu|preventDefault={(e) => toggle_cell_menu(e, index, j)} style="width: {get_cell_width(j)}; left: {get_cell_position(j)}; {styling || ''}" class:flash={copy_flash && is_in_selection} class:cell-selected={is_in_selection} class:no-top={has_no_top} class:no-bottom={has_no_bottom} class:no-left={has_no_left} class:no-right={has_no_right} class:menu-active={active_cell_menu && active_cell_menu.row === index && active_cell_menu.col === j} class:dragging={is_dragging} >
{ const row = index; const col = j; if (!selected_cells.some(([r, c]) => r === row && c === col)) { selected_cells = [[row, col]]; } }} on:blur={handle_blur} {max_chars} {i18n} {components} show_selection_buttons={selected_cells.length === 1 && selected_cells[0][0] === index && selected_cells[0][1] === j} coords={[index, j]} on_select_column={handle_select_column} on_select_row={handle_select_row} {is_dragging} wrap_text={wrap} /> {#if editable && should_show_cell_menu([index, j], selected_cells, editable)} toggle_cell_menu(event, index, j)} /> {/if}