Browse Source

fix(gui): reload column width data when column create/delete or when view changes

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3977/head
Pranav C 2 years ago
parent
commit
bee72fc5be
  1. 5
      packages/nc-gui/composables/useGridViewColumnWidth.ts

5
packages/nc-gui/composables/useGridViewColumnWidth.ts

@ -50,8 +50,9 @@ export function useGridViewColumnWidth(view: Ref<GridType | undefined>) {
loadCss()
}
/** when columns changes(create/delete) reload grid columns */
watch(columns, loadGridViewColumns)
/** when columns changes(create/delete) reload grid columns
* or when view changes reload columns width */
watch([() => columns.value?.length, () => view?.value?.id ], loadGridViewColumns)
const updateWidth = async (id: string, width: string) => {
if (gridViewCols?.value?.[id]) {

Loading…
Cancel
Save