Limit the number of choices in member input
This commit is contained in:
		@@ -65,11 +65,13 @@ export function MemberInput(p: {
 | 
			
		||||
      }}
 | 
			
		||||
      options={choices}
 | 
			
		||||
      sx={{ width: "100%" }}
 | 
			
		||||
      filterOptions={(options, state) =>
 | 
			
		||||
        options.filter((m) =>
 | 
			
		||||
      filterOptions={(options, state) => {
 | 
			
		||||
        const res = options.filter((m) =>
 | 
			
		||||
          m?.fullName.toLowerCase().includes(state.inputValue)
 | 
			
		||||
        )
 | 
			
		||||
      }
 | 
			
		||||
        );
 | 
			
		||||
        res.length = Math.min(15, res.length);
 | 
			
		||||
        return res;
 | 
			
		||||
      }}
 | 
			
		||||
      getOptionLabel={(o) => o?.fullName ?? ""}
 | 
			
		||||
      renderInput={(params) => <TextField {...params} label={p.label} />}
 | 
			
		||||
      renderOption={(_props, option, _state) => (
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user