mid
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user