Skip to content

Kemi: W1 loses its page and sort after every save #1468

Open

Description

@renemadsen

What is wrong

Every reload after a save sets the inventory to null, which unmounts the W1 grid (*ngIf="inventory"). The paginator page and the sort are lost after registering, moving or removing a placement. This follows the I-1 rule "never show empty while loading", so the fix has to keep that rule.

Where (stable a81a41b)

  • eform-client/src/app/plugins/modules/backend-configuration-pn/modules/chemicals/components/chemical-inventory-page/chemical-inventory-page.component.ts:126-130 (reload() calls setInventory(null))
  • eform-client/src/app/plugins/modules/backend-configuration-pn/modules/chemicals/components/chemical-inventory-page/chemical-inventory-page.component.html:70

Suggested fix

On a reload after a save, keep the current inventory on screen (with a loading state) and replace it when the answer arrives. Clear it only on a property switch. Add a spec that page and sort survive a save.

Origin

Plan E final review §4 (T12 N-m2), PR #1437 (merged as a81a41b).

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions