Skip to content

fix(admin): keep import filter values on re-render - #720

Merged
navneetkumar-pim-webkul merged 1 commit into
unopim:3.xfrom
vipinkutthi-webkul:fix/import-filter-values-reset
Sep 22, 2026
Merged

navneetkumar-pim-webkul merged 1 commit into
unopim:3.xfrom
vipinkutthi-webkul:fix/import-filter-values-reset

Conversation

@vipinkutthi-webkul

Copy link
Copy Markdown
Contributor

Description

Import filter selections were discarded on every re-render, breaking any filter
field that declares depends_on.

v-import-filter-fields declared initialValues as a computed, so it returned a
new object identity on each re-evaluation. v-field-set deep-watches that prop and
rebuilds values from it, so a selection was wiped immediately after being set.

A dependent field resolves its parent's value through scopedField() to build its
query_params. With values emptied, the parent resolved to an empty array, the
param was dropped from the request, and the dependent field fetched its options
unscoped — returning nothing and leaving the dropdown permanently empty.

Moved initialValues into data(), matching v-filter-fields on the export side,
which is why export profiles were never affected.

initialValues was a computed, returning a new object identity each
re-evaluation and tripping v-field-set's deep watcher, which reset `values`
and dropped the user's selections. Dependent fields like Magento Store Views
then fetched without their parent `credential` filter. Moved to data(),
matching v-filter-fields on the export side.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Add import-specific regression coverage for dependent filter re-rendering.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

Fixes import filter selections being reset during Vue re-renders, preserving dependent-field values and scoped requests.

Changes:

  • Moves initialValues from a computed property into stable component data.
  • Prevents import filter state from being reinitialized on re-render.
File Description
packages/​Webkul/​Admin/​src/​Resources/​views/​components/​data-transfer/​import-setting-fields.blade.php Stabilizes import filter values for dependent fields.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@navneetkumar-pim-webkul
navneetkumar-pim-webkul merged commit b8af0db into unopim:3.x Sep 22, 2026
19 checks passed
@navneetkumar-pim-webkul navneetkumar-pim-webkul mentioned this pull request Sep 24, 2026
2 of 6 tasks
navneetkumar-pim-webkul added a commit that referenced this pull request Sep 24, 2026
Six merged pull requests since v3.1.1 carried no changelog entry: the
gallery unsaved badge and worker timeout handler (#713), the import filter
re-render (#720), the worker timeout alarm (#722), the channel name on
PostgreSQL (#725), the price input height (#726), and the export view
events (#717, #718). The two fixes pending in #727 and #728 are included
so the cut merges after them.

The model recommendation entry described the cheap-tier ranking that #724
replaced with newest-per-family; it now describes the shipped behaviour.

3.1.2 is a patch release, so everything is filed under bug fixes and
improvements; no feature section. Core::VERSION, package.json and the
UPGRADE.md walkthrough move to 3.1.2 together, as they did for 3.1.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants