Browse Source

Merge pull request #7837 from nocodb/nc-fix/7808-column-reorder

Nc fix/7808 column reorder
pull/6831/head
Ramesh Mane 9 months ago committed by GitHub
parent
commit
540f8187f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue
  2. 4
      packages/nocodb/src/controllers/view-columns.controller.ts

4
packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

@ -83,6 +83,7 @@ const gridDisplayValueField = computed(() => {
})
const onMove = async (_event: { moved: { newIndex: number; oldIndex: number } }, undo = false) => {
try {
// todo : sync with server
if (!fields.value) return
@ -135,6 +136,9 @@ const onMove = async (_event: { moved: { newIndex: number; oldIndex: number } },
reloadViewDataHook?.trigger()
$e('a:fields:reorder')
} catch (e) {
message.error(await extractSdkResponseErrorMsg(e))
}
}
const coverOptions = computed<SelectProps['options']>(() => {

4
packages/nocodb/src/controllers/view-columns.controller.ts

@ -58,8 +58,8 @@ export class ViewColumnsController {
'/api/v1/db/meta/views/:viewId/columns/:columnId',
'/api/v2/meta/views/:viewId/columns/:columnId',
])
@Acl('columnUpdate')
async columnUpdate(
@Acl('viewColumnUpdate')
async viewColumnUpdate(
@Param('viewId') viewId: string,
@Param('columnId') columnId: string,
@Body() body: ViewColumnReqType,

Loading…
Cancel
Save