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 { export {
uiTypes, getUIDTIcon uiTypes, getUIDTIcon
} }
export default [ export default [
'ID', 'ID',
'ForeignKey', 'ForeignKey',

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

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

Loading…
Cancel
Save