Browse Source

Merge pull request #9720 from nocodb/nc-fix/form-view-prefill-issue

fix(nc-gui): prefill form decode query param issue
pull/9726/head
Ramesh Mane 4 weeks ago committed by GitHub
parent
commit
62ad252db4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
  2. 4
      packages/nc-gui/components/nc/MenuItem.vue
  3. 4
      packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue
  4. 2
      packages/nc-gui/composables/useSharedFormViewStore.ts

8
packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue

@ -211,11 +211,9 @@ function sharedViewUrl() {
dashboardUrl1 = `${baseUrl}${appInfo.value?.dashboardPath}`
}
return encodeURI(
`${dashboardUrl1}#/nc/${viewType}/${activeView.value.uuid}${surveyMode.value ? '/survey' : ''}${
viewStore.preFillFormSearchParams && formPreFill.value.preFillEnabled ? `?${viewStore.preFillFormSearchParams}` : ''
}`,
)
return `${encodeURI(`${dashboardUrl1}#/nc/${viewType}/${activeView.value.uuid}${surveyMode.value ? '/survey' : ''}`)}${
viewStore.preFillFormSearchParams && formPreFill.value.preFillEnabled ? `?${viewStore.preFillFormSearchParams}` : ''
}`
}
const toggleViewShare = async () => {

4
packages/nc-gui/components/nc/MenuItem.vue

@ -4,9 +4,9 @@
* - **Issue**: When conditionally rendering `NcMenuItem` using `v-if` without a corresponding `v-else` fallback,
* Vue may throw a
* `NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.`.
*
*
* - This issue occurs specifically when the `NcMenu` is open, and the condition changes dynamically (e.g., during runtime state changes)
*
*
* - **Fix**: Use `v-show` instead of `v-if` when no replacement (fallback) node is provided. This keeps the element
* in the DOM but toggles its visibility, preventing the DOM manipulation issue.
*/

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

@ -134,9 +134,9 @@ const onDelete = async () => {
* - **Issue**: When conditionally rendering `NcMenuItem` using `v-if` without a corresponding `v-else` fallback,
* Vue may throw a
* `NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.`.
*
*
* - This issue occurs specifically when the `NcMenu` is open, and the condition changes dynamically (e.g., during runtime state changes)
*
*
* - **Fix**: Use `v-show` instead of `v-if` when no replacement (fallback) node is provided. This keeps the element
* in the DOM but toggles its visibility, preventing the DOM manipulation issue.
*/

2
packages/nc-gui/composables/useSharedFormViewStore.ts

@ -443,7 +443,7 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
if (Object.keys(route.query || {}).length) {
columns.value = await Promise.all(
(columns.value || []).map(async (c) => {
const queryParam = route.query[c.title as string] || route.query[encodeURIComponent(c.title as string)]
const queryParam = route.query[c.title as string]
if (
!c.title ||

Loading…
Cancel
Save