AutosuggestPlugin: clear suggestions after selecting a suggestion

environments/review-lexical-ujdd17/deployments/4015
Alex Gleason 2023-09-23 14:26:43 -05:00
rodzic aa4992e716
commit 206927fd4b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -30,7 +30,7 @@ import React, {
} from 'react';
import ReactDOM from 'react-dom';
import { fetchComposeSuggestions } from 'soapbox/actions/compose';
import { clearComposeSuggestions, fetchComposeSuggestions } from 'soapbox/actions/compose';
import { useEmoji } from 'soapbox/actions/emojis';
import AutosuggestEmoji from 'soapbox/components/autosuggest-emoji';
import { isNativeEmoji } from 'soapbox/features/emoji';
@ -335,6 +335,8 @@ const AutosuggestPlugin = ({
node.setTextContent(`@${content} `);
node.select();
}
dispatch(clearComposeSuggestions(composeId));
});
});
};