This commit is contained in:
focp212@naver.com
2025-10-29 17:59:52 +09:00
parent 8529f501c7
commit 8d67d59d78
4 changed files with 24 additions and 16 deletions

View File

@@ -3,13 +3,13 @@ import { ChangeEvent, useEffect, useState } from "react";
export interface FilterSelectMidProps {
title: string;
selectValue: string;
selectSetter: (value: any) => void;
showType: 'GID' | 'MID'
};
export const FilterSelectMid = ({
title,
selectValue,
selectSetter,
showType = 'GID'
}: FilterSelectMidProps) => {
const midOptions = useStore.getState().UserStore.selectOptionsMids;
const userMid = useStore.getState().UserStore.mid;
@@ -19,6 +19,13 @@ export const FilterSelectMid = ({
const getSelectMidOptions = () => {
let rs = [];
for(let i=0;i<midOptions.length;i++){
let value = midOptions[i]?.value;
if(value && showType === 'MID'){
let last = value.slice(-1);
if(last.toLowerCase() === 'g'){
continue;
}
}
rs.push(
<option
key={ `key-filter-select-${i}` }
@@ -33,7 +40,7 @@ export const FilterSelectMid = ({
};
useEffect(() => {
selectSetter(filterMid);
}, [filterMid]);
return (