Alert is being updated for every change, hence the screenreader readsout the alert everytime a change occursin the input (#1544)

* Alert is being updated for every change, hence the screenreader readsout the alert everytime a change occursin the input

* Update DeleteCollectionConfirmationPane.tsx

* Update DeleteCollectionConfirmationPane.tsx
This commit is contained in:
MokireddySampath 2023-11-22 00:07:33 +05:30 committed by GitHub
parent d0c75e4490
commit 4fcbf7f0ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -35,10 +35,11 @@ export const DeleteCollectionConfirmationPane: FunctionComponent<DeleteCollectio
const collectionName = getCollectionName().toLocaleLowerCase();
const paneTitle = "Delete " + collectionName;
const onSubmit = async (): Promise<void> => {
const collection = useSelectedNode.getState().findSelectedCollection();
if (!collection || inputCollectionName !== collection.id()) {
const errorMessage = "Input " + collectionName + " id does not match the selected " + collectionName;
const errorMessage = "Input id " + inputCollectionName + " does not match the selected " + collection.id();
setFormError(errorMessage);
NotificationConsoleUtils.logConsoleError(
`Error while deleting ${collectionName} ${collection.id()}: ${errorMessage}`,