Browse Source

refactor: limit display value in message to 20chars

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5952/head
Pranav C 1 year ago
parent
commit
8290478d1d
  1. 6
      packages/nc-gui/composables/useExpandedFormStore.ts

6
packages/nc-gui/composables/useExpandedFormStore.ts

@ -267,7 +267,11 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
addOrEditStackRow(row.value, isNewRow)
}
message.success(`${displayValue.value || 'Row'} updated successfully.`)
// trim the display value if greater than 20chars
const trimmedDisplayValue =
displayValue.value && displayValue.value?.length > 20 ? `${displayValue.value?.substring(0, 20)}...` : displayValue.value
message.success(`${trimmedDisplayValue || 'Row'} updated successfully.`)
changedColumns.value = new Set()
} catch (e: any) {

Loading…
Cancel
Save