Browse Source

Merge pull request #2549 from nocodb/fix/added-space-removal-logic-to-table-name-on-creation

fix: Removed auto snake casing for table name on creation
pull/2559/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
59b942164b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      packages/nc-gui/components/utils/DlgTableCreate.vue

6
packages/nc-gui/components/utils/DlgTableCreate.vue

@ -154,8 +154,6 @@
</template> </template>
<script> <script>
import inflection from 'inflection'
import { validateTableName } from '~/helpers' import { validateTableName } from '~/helpers'
export default { export default {
@ -196,8 +194,8 @@ export default {
} }
}, },
watch: { watch: {
'table.alias'(v) { 'table.alias'(alias) {
this.$set(this.table, 'name', `${this.projectPrefix || ''}${inflection.underscore(v.replace(/^\s+|\s+$/g, m => new Array(m.length).fill('_').join('')))}`) this.$set(this.table, 'name', `${this.projectPrefix || ''}${alias}`)
} }
}, },
created() { created() {

Loading…
Cancel
Save