AutosuggestPlugin: clear suggestions after selecting a suggestion
This commit is contained in:
parent
aa4992e716
commit
206927fd4b
1 changed files with 3 additions and 1 deletions
|
@ -30,7 +30,7 @@ import React, {
|
||||||
} from 'react';
|
} from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
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 { useEmoji } from 'soapbox/actions/emojis';
|
||||||
import AutosuggestEmoji from 'soapbox/components/autosuggest-emoji';
|
import AutosuggestEmoji from 'soapbox/components/autosuggest-emoji';
|
||||||
import { isNativeEmoji } from 'soapbox/features/emoji';
|
import { isNativeEmoji } from 'soapbox/features/emoji';
|
||||||
|
@ -335,6 +335,8 @@ const AutosuggestPlugin = ({
|
||||||
node.setTextContent(`@${content} `);
|
node.setTextContent(`@${content} `);
|
||||||
node.select();
|
node.select();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dispatch(clearComposeSuggestions(composeId));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue