diff --git a/tdrive/frontend/public/locales/en.json b/tdrive/frontend/public/locales/en.json index 30336c23..524745c4 100644 --- a/tdrive/frontend/public/locales/en.json +++ b/tdrive/frontend/public/locales/en.json @@ -52,6 +52,7 @@ "scenes.app.workspaces.create_company.group_data.group_main_activity.other": "Other", "components.drive_dropzone.uploading": "Uploading...", "components.user_picker.modal_no_result": "No results found", + "components.user_picker.modal_results_trucated": "First {{$1}} results of {{$2}} shown...", "components.users_picker.add_me": "Add me", "scenes.app.workspaces.create_company.invitations.title": "Configure your workspace.", "scenes.app.header.disconnected": "You are disconnected", diff --git a/tdrive/frontend/src/app/views/client/body/drive/components/select-users.tsx b/tdrive/frontend/src/app/views/client/body/drive/components/select-users.tsx index af9c4089..31b52f72 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/components/select-users.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/components/select-users.tsx @@ -20,6 +20,7 @@ export default (props: { const { search, result, query } = useSearchUsers({ scope: 'company' }); const [isFocus, setFocus] = useState(false); const inputElement = useRef(null); + const maxUserResultsShown = 5; useEffect(() => { if (users.length) props.onChange(users); @@ -55,7 +56,7 @@ export default (props: { {Languages.t('components.user_picker.modal_no_result')} )} - {_.reverse(result.slice(0, 5)).map((user, i) => { + {_.reverse(result.slice(0, maxUserResultsShown)).map((user, i) => { return (
0 ? ' border-t' : '')}>
@@ -78,6 +79,12 @@ export default (props: {
); })} + {result.length > maxUserResultsShown && +
+ {Languages.t('components.user_picker.modal_results_trucated', + [maxUserResultsShown, result.length], + 'First {{$1}} results of {{$2}} shown...')} +
}