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:
parent
d0c75e4490
commit
4fcbf7f0ea
|
@ -35,10 +35,11 @@ export const DeleteCollectionConfirmationPane: FunctionComponent<DeleteCollectio
|
||||||
|
|
||||||
const collectionName = getCollectionName().toLocaleLowerCase();
|
const collectionName = getCollectionName().toLocaleLowerCase();
|
||||||
const paneTitle = "Delete " + collectionName;
|
const paneTitle = "Delete " + collectionName;
|
||||||
|
|
||||||
const onSubmit = async (): Promise<void> => {
|
const onSubmit = async (): Promise<void> => {
|
||||||
const collection = useSelectedNode.getState().findSelectedCollection();
|
const collection = useSelectedNode.getState().findSelectedCollection();
|
||||||
if (!collection || inputCollectionName !== collection.id()) {
|
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);
|
setFormError(errorMessage);
|
||||||
NotificationConsoleUtils.logConsoleError(
|
NotificationConsoleUtils.logConsoleError(
|
||||||
`Error while deleting ${collectionName} ${collection.id()}: ${errorMessage}`,
|
`Error while deleting ${collectionName} ${collection.id()}: ${errorMessage}`,
|
||||||
|
|
Loading…
Reference in New Issue