Browse Source

chore(gui-v2): lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3339/head
Pranav C 2 years ago
parent
commit
d70c309505
  1. 12
      packages/nc-gui-v2/components/smartsheet/Grid.vue

12
packages/nc-gui-v2/components/smartsheet/Grid.vue

@ -174,7 +174,7 @@ const makeEditable = (row: Row, col: ColumnType) => {
return
}
if (!isPkAvail.value && !row.rowMeta.new) {
message.info('Update not allowed for table which doesn\'t have primary Key')
message.info("Update not allowed for table which doesn't have primary Key")
return
}
if (col.ai) {
@ -240,11 +240,12 @@ const onKeyDown = async (e: KeyboardEvent) => {
e.preventDefault()
if (selected.row < data.value.length - 1) selected.row++
break
default: {
default:
{
const rowObj = data.value[selected.row]
const columnObj = fields.value[selected.col]
if (!editEnabled && e.metaKey || e.ctrlKey) {
if ((!editEnabled && e.metaKey) || e.ctrlKey) {
switch (e.keyCode) {
// copy - ctrl/cmd +c
case 67:
@ -260,7 +261,7 @@ const onKeyDown = async (e: KeyboardEvent) => {
/** on letter key press make cell editable and empty */
if (e?.key?.length === 1) {
if (!isPkAvail && !rowObj.rowMeta.new) {
return message.info('Update not allowed for table which doesn\'t have primary Key')
return message.info("Update not allowed for table which doesn't have primary Key")
}
if (makeEditable(rowObj, columnObj)) {
rowObj.row[columnObj.title] = ''
@ -398,8 +399,7 @@ const onNavigate = (dir: NavigateDir) => {
<a-checkbox v-model:checked="row.rowMeta.selected" />
</div>
<span class="flex-1" />
<div v-if="!readOnly && !isLocked" class="nc-expand"
:class="{ 'nc-comment': row.rowMeta?.commentCount }">
<div v-if="!readOnly && !isLocked" class="nc-expand" :class="{ 'nc-comment': row.rowMeta?.commentCount }">
<span
v-if="row.rowMeta?.commentCount"
class="py-1 px-3 rounded-full text-xs cursor-pointer select-none transform hover:(scale-110)"

Loading…
Cancel
Save