Skip to content

Key/Value Field: Preserve key/value order from UI on backend update #31904

@nicobytes

Description

@nicobytes

Task

The key/value component currently allows users to reorder items via drag-and-drop in the UI. However, this order is lost when the data is sent to the backend using the following endpoint:

PUT {{API_URL}}/api/v1/workflow/actions/b9d89c80-3d88-4311-8365-187323c96436/fire?indexPolicy=WAIT_FOR&inode=37ba3981-966b-45f6-aa5c-473976e21e63

As seen in the UI and request payload, the order is respected:

"keyValue": {
  "z": "as",
  "age": "23",
  "lastname": "molina",
  "name": "nicolas"
}

However, when the response comes back, the keyValue is sorted alphabetically:

"keyValue": {
  "age": "23",
  "lastname": "molina",
  "name": "nicolas",
  "z": "as"
}

This prevents the UI from reflecting the user’s preferred ordering after saving.

Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

Acceptance Criteria

  • When a user reorders key/value pairs in the UI, the order is sent and stored as-is.
  • The backend persists and returns the key/value pairs in the exact order received.
  • UI remains consistent with the user’s ordering after a save operation.

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

Image

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Future

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions