Browse Source

fix: handle null query_params in csv export

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/760/head
Pranav C 3 years ago
parent
commit
81ec4314cc
  1. 1
      packages/nc-gui/components/project/spreadsheet/helpers/uiTypes.js
  2. 20
      packages/nc-gui/components/templates/editor.vue

1
packages/nc-gui/components/project/spreadsheet/helpers/uiTypes.js

@ -157,6 +157,7 @@ const getUIDTIcon = (uidt) => {
export {
uiTypes, getUIDTIcon
}
export default [
'ID',
'ForeignKey',

20
packages/nc-gui/components/templates/editor.vue

@ -863,15 +863,17 @@ export default {
return
}
const el = document.createElement('textarea')
el.value = JSON.stringify(this.projectTemplate, null, 2)
debugger
el.setAttribute('readonly', '')
el.style = { position: 'absolute', left: '-9999px' }
document.body.appendChild(el)
el.select()
document.execCommand('copy')
document.body.removeChild(el)
this.$clipboard(JSON.stringify(this.projectTemplate, null, 2))
// const el = document.createElement('textarea')
// el.value = JSON.stringify(this.projectTemplate, null, 2)
// debugger
// el.setAttribute('readonly', '')
// el.style = { position: 'absolute', left: '-9999px' }
// document.body.appendChild(el)
// el.select()
// document.execCommand('copy')
// document.body.removeChild(el)
this.$toast.success('Successfully copied JSON data to clipboard!').goAway(3000)
return true
},

Loading…
Cancel
Save