Browse Source

chore(nc-gui): lint

pull/9720/head
Ramesh Mane 1 month ago
parent
commit
f861f71cdb
  1. 4
      packages/nc-gui/components/nc/MenuItem.vue
  2. 4
      packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue
  3. 3
      packages/nc-gui/composables/useSharedFormViewStore.ts

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, * - **Issue**: When conditionally rendering `NcMenuItem` using `v-if` without a corresponding `v-else` fallback,
* Vue may throw a * 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.`. * `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) * - 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 * - **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. * 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, * - **Issue**: When conditionally rendering `NcMenuItem` using `v-if` without a corresponding `v-else` fallback,
* Vue may throw a * 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.`. * `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) * - 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 * - **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. * in the DOM but toggles its visibility, preventing the DOM manipulation issue.
*/ */

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

@ -441,8 +441,6 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
async function handlePreFillForm() { async function handlePreFillForm() {
if (Object.keys(route.query || {}).length) { if (Object.keys(route.query || {}).length) {
// Decode query parameter keys
columns.value = await Promise.all( columns.value = await Promise.all(
(columns.value || []).map(async (c) => { (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] || route.query[encodeURIComponent(c.title as string)]
@ -458,7 +456,6 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
) { ) {
return c return c
} }
const decodedQueryParam = Array.isArray(queryParam) const decodedQueryParam = Array.isArray(queryParam)
? queryParam.map((qp) => decodeURIComponent(qp as string).trim()) ? queryParam.map((qp) => decodeURIComponent(qp as string).trim())
: decodeURIComponent(queryParam as string).trim() : decodeURIComponent(queryParam as string).trim()

Loading…
Cancel
Save