add domain manager

This commit is contained in:
2025-03-25 19:19:09 +08:00
parent 45443709af
commit d649666379
9 changed files with 319 additions and 16 deletions

View File

@@ -1,13 +1,15 @@
import { MenuItem, Select as MuiSelect, SelectProps as MuiSelectProps } from '@mui/material';
import React from 'react';
type SelectProps = {
options?: { label: string; value: string }[];
} & MuiSelectProps;
export const Select = (props: SelectProps) => {
export const Select = React.forwardRef((props: SelectProps, ref) => {
const { options, ...rest } = props;
console.log(props, 'props');
return (
<MuiSelect {...rest}>
<MuiSelect {...rest} ref={ref}>
{options?.map((option) => (
<MenuItem key={option.value} value={option.value}>
{option.label}
@@ -15,4 +17,4 @@ export const Select = (props: SelectProps) => {
))}
</MuiSelect>
);
};
});