Browse Source

fix: make the add icon in the grid horizontally sticky

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5805/head
Pranav C 1 year ago
parent
commit
7d880e1e6d
  1. 11
      packages/nc-gui/components/smartsheet/Grid.vue

11
packages/nc-gui/components/smartsheet/Grid.vue

@ -815,7 +815,7 @@ const deleteSelectedRangeOfRows = () => {
}
function addEmptyRow(row?: number) {
const rowObj = _addEmptyRow(row);
const rowObj = _addEmptyRow(row)
nextTick().then(() => {
makeActive(row ?? data.value.length - 1, 0)
scrollToCell?.()
@ -1022,18 +1022,19 @@ function addEmptyRow(row?: number) {
</template>
</LazySmartsheetRow>
<tr v-if="isAddingEmptyRowAllowed">
<td
<tr
v-if="isAddingEmptyRowAllowed"
v-e="['c:row:add:grid-bottom']"
:colspan="visibleColLength + 1"
class="text-left pointer nc-grid-add-new-cell cursor-pointer"
class="cursor-pointer"
@mouseup.stop
@click="addEmptyRow()"
>
<td class="text-left pointer nc-grid-add-new-cell sticky left-0 !z-5 !border-r-0">
<div class="px-2 w-full flex items-center text-gray-500">
<component :is="iconMap.plus" class="text-pint-500 text-xs ml-2 text-primary" />
</div>
</td>
<td :colspan="visibleColLength"></td>
</tr>
</tbody>
</table>

Loading…
Cancel
Save