@@ -374,7 +374,6 @@ const ManagePasskeyDrawer: React.FC<ManagePasskeyDrawerProps> = ({
|
||||
title={t("rename_passkey")}
|
||||
label={t("name")}
|
||||
placeholder={t("enter_passkey_name")}
|
||||
autoFocus
|
||||
initialValue={passkey.friendlyName}
|
||||
submitButtonTitle={t("rename")}
|
||||
onSubmit={handleRenamePasskeySubmit}
|
||||
|
||||
@@ -520,7 +520,6 @@ const CollectionOptions: React.FC<CollectionHeaderProps> = ({
|
||||
{...albumNameInputVisibilityProps}
|
||||
title={t("rename_album")}
|
||||
label={t("album_name")}
|
||||
autoFocus
|
||||
initialValue={activeCollection?.name}
|
||||
submitButtonColor="primary"
|
||||
submitButtonTitle={t("rename")}
|
||||
|
||||
@@ -852,7 +852,6 @@ export const Upload: React.FC<UploadProps> = ({
|
||||
{...newAlbumNameInputVisibilityProps}
|
||||
title={t("new_album")}
|
||||
label={t("album_name")}
|
||||
autoFocus
|
||||
initialValue={prefilledNewAlbumName}
|
||||
submitButtonTitle={t("create")}
|
||||
onSubmit={uploadToSingleNewCollection}
|
||||
|
||||
@@ -1143,7 +1143,6 @@ const Page: React.FC = () => {
|
||||
{...albumNameInputVisibilityProps}
|
||||
title={t("new_album")}
|
||||
label={t("album_name")}
|
||||
autoFocus
|
||||
submitButtonTitle={t("create")}
|
||||
onSubmit={handleAlbumNameSubmit}
|
||||
/>
|
||||
|
||||
@@ -98,6 +98,7 @@ export const LoginContents: React.FC<LoginContentsProps> = ({
|
||||
autoComplete="username"
|
||||
label={t("enter_email")}
|
||||
fullWidth
|
||||
autoFocus
|
||||
margin="normal"
|
||||
disabled={formik.isSubmitting}
|
||||
error={!!formik.errors.email}
|
||||
|
||||
@@ -204,6 +204,7 @@ export const VerifyMasterPasswordForm: React.FC<
|
||||
autoComplete="current-password"
|
||||
label={t("password")}
|
||||
fullWidth
|
||||
autoFocus
|
||||
margin="normal"
|
||||
disabled={formik.isSubmitting}
|
||||
error={!!formik.errors.password}
|
||||
|
||||
@@ -91,10 +91,14 @@ export type SingleInputFormProps = Pick<
|
||||
* Submission is handled as an async function, during which the input is
|
||||
* disabled and a loading indicator is shown. Errors during submission are shown
|
||||
* as the helper text associated with the text field.
|
||||
*
|
||||
* The input field in the form takes autoFocus automatically on mount. Turn off
|
||||
* the {@link autoFocus} to disable this behaviour if needed.
|
||||
*/
|
||||
export const SingleInputForm: React.FC<SingleInputFormProps> = ({
|
||||
inputType,
|
||||
initialValue,
|
||||
autoFocus,
|
||||
submitButtonTitle,
|
||||
submitButtonColor,
|
||||
onCancel,
|
||||
@@ -153,6 +157,7 @@ export const SingleInputForm: React.FC<SingleInputFormProps> = ({
|
||||
onChange={formik.handleChange}
|
||||
type={showPassword ? "text" : (inputType ?? "text")}
|
||||
fullWidth
|
||||
autoFocus={autoFocus ?? true}
|
||||
margin="normal"
|
||||
disabled={formik.isSubmitting}
|
||||
error={!!formik.errors.value}
|
||||
|
||||
@@ -842,7 +842,6 @@ const RenameFileDialog: React.FC<RenameFileDialogProps> = ({
|
||||
<SingleInputForm
|
||||
label={t("file_name")}
|
||||
placeholder={t("file_name")}
|
||||
autoFocus
|
||||
initialValue={name}
|
||||
submitButtonColor="primary"
|
||||
submitButtonTitle={t("rename")}
|
||||
|
||||
@@ -96,6 +96,7 @@ export const UploaderNameInput: React.FC<UploaderNameInput> = ({
|
||||
onChange={formik.handleChange}
|
||||
type={"text"}
|
||||
fullWidth
|
||||
autoFocus
|
||||
margin="normal"
|
||||
hiddenLabel
|
||||
aria-label={t("name")}
|
||||
|
||||
@@ -166,7 +166,6 @@ const CGroupPersonHeader: React.FC<CGroupPersonHeaderProps> = ({ person }) => {
|
||||
label={t("name")}
|
||||
placeholder={t("enter_name")}
|
||||
autoComplete="name"
|
||||
autoFocus
|
||||
initialValue={name}
|
||||
submitButtonColor="primary"
|
||||
submitButtonTitle={t("rename")}
|
||||
@@ -373,7 +372,6 @@ const AddPersonDialog: React.FC<AddPersonDialogProps> = ({
|
||||
label={t("add_name")}
|
||||
placeholder={t("enter_name")}
|
||||
autoComplete="name"
|
||||
autoFocus
|
||||
submitButtonColor="primary"
|
||||
submitButtonTitle={t("add")}
|
||||
onSubmit={handleAddPersonWithName}
|
||||
|
||||
Reference in New Issue
Block a user