Skip to content

luci-base: add member keep_order to MultiValue#8758

Open
muink wants to merge 1 commit into
openwrt:masterfrom
muink:dev
Open

luci-base: add member keep_order to MultiValue#8758
muink wants to merge 1 commit into
openwrt:masterfrom
muink:dev

Conversation

@muink

@muink muink commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Pull request details

Description

Add member keep_order to MultiValue.

Allow MultiValue widgets to preserve user selection order.

When enabled, selected values are saved in user selection order instead of choice order.

By default, keep_order is false and existing behavior is unchanged. When true, values are saved in the order they were selected by the user.

Screenshot or video of changes (if applicable)

Maintainer (preferred)

@systemcrash @hnyman


Tested on

OpenWrt version: OpenWrt 25.12.4 (r32933-4ccb782af7)
LuCI version: openwrt-25.12 branch (26.164.56110~44618b5)
Web browser(s):


Checklist

  • This PR is not from my main or master branch 💩, but a separate branch. ✅
  • Each commit has a valid ✒️ Signed-off-by: <my@email.address> row (via git commit --signoff).
  • Each commit and PR title has a valid 📝 <package name>: title first line subject for packages.
  • Incremented 🆙 any PKG_VERSION in the Makefile.
  • (Optional) Includes what Issue it closes (e.g. openwrt/luci#issue-number).
  • (Optional) Includes what it depends on (e.g. openwrt/packages#pr-number in sister repo).

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 1 new commit; no commit-message issues found. One inline note on missing API documentation for the new keep_order member.


Generated by Claude Code

Comment thread modules/luci-base/htdocs/luci-static/resources/form.js

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 1 new commit; no new issues found.

The only change since the last review adds the keep_order JSDoc @member block on CBIMultiValue, which resolves the previously raised documentation note.


Generated by Claude Code

Add member `keep_order` to `MultiValue`.

Allow MultiValue widgets to preserve user selection order.

When enabled, selected values are saved in user selection
order instead of choice order.

By default, `keep_order` is `false` and existing behavior is
unchanged. When `true`, values are saved in the order they
were selected by the user.

Signed-off-by: Anya Lin <hukk1996@gmail.com>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 1 new commit; no new issues found.

The head SHA changed since the last review, but the branch was only rebased onto a newer master; the PR's own changes to form.js and ui.js are byte-identical to the previously reviewed state.


Generated by Claude Code

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.

2 participants