allow functions for items in mention node

This commit is contained in:
Philipp Kühn
2018-11-08 16:50:23 +01:00
parent c5d7ef4e79
commit 42c177f59e
2 changed files with 2 additions and 2 deletions

View File

@@ -127,7 +127,7 @@ export default function SuggestionsPlugin({
text: state.text,
decorationNode,
virtualNode,
items: onFilter(items, state.query),
items: onFilter(Array.isArray(items) ? items : items(), state.query),
command: ({ range, attrs }) => {
command({
range,