🔧 fix: filter out empty string group from pricing groups selector (#1365)
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
This commit is contained in:
@@ -30,7 +30,7 @@ import SelectableButtonGroup from '../../../common/ui/SelectableButtonGroup';
|
|||||||
* @param {Function} t i18n
|
* @param {Function} t i18n
|
||||||
*/
|
*/
|
||||||
const PricingGroups = ({ filterGroup, setFilterGroup, usableGroup = {}, models = [], loading = false, t }) => {
|
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) => {
|
const items = groups.map((g) => {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user