From 8a54512037b36bef1189a197b112c9efe53bc1f8 Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Wed, 23 Jul 2025 10:04:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix:=20filter=20out=20empty=20st?= =?UTF-8?q?ring=20group=20from=20pricing=20groups=20selector=20(#1365)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Filter out the special empty string group ("": "用户分组") from the usable groups in PricingGroups component. This empty group represents "user's current group" but contains no data and should not be displayed in the group filter options. - Add filter condition to exclude empty string keys from usableGroup - Prevents displaying invalid empty group option in UI - Improves user experience by showing only valid selectable groups --- web/src/components/table/model-pricing/filter/PricingGroups.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/table/model-pricing/filter/PricingGroups.jsx b/web/src/components/table/model-pricing/filter/PricingGroups.jsx index 4ce67ff9..75bdc2c7 100644 --- a/web/src/components/table/model-pricing/filter/PricingGroups.jsx +++ b/web/src/components/table/model-pricing/filter/PricingGroups.jsx @@ -30,7 +30,7 @@ import SelectableButtonGroup from '../../../common/ui/SelectableButtonGroup'; * @param {Function} t i18n */ const PricingGroups = ({ filterGroup, setFilterGroup, usableGroup = {}, models = [], loading = false, t }) => { - const groups = ['all', ...Object.keys(usableGroup)]; + const groups = ['all', ...Object.keys(usableGroup).filter(key => key !== '')]; const items = groups.map((g) => { let count = 0;