Closed v1talii-dev closed 1 year ago
@Ni55aN можете посмотреть проблему, пожалуйста?
Удалось решить следующим способом:
import ContextMenuPlugin, { Menu } from 'rete-context-menu-plugin';
// ...
editor.use(ContextMenuPlugin, {
vueComponent: {
extends: { ...Menu },
computed: {
...Menu.computed,
filtered: function() {
try {
if (!this.filter) {
return this.items;
}
const search = this.filter.toLowerCase();
return this.extractLeafs(this.items).filter(({ title }) => {
const el = title.toLowerCase();
return this.searchKeep(el) || el.includes(search);
});
} catch (e) {
console.error(e);
}
}
},
}
});
const regex = new RegExp(this.filter.replace(/[*+]/, '\\$&'), 'gi');
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.
При попытке ввода символов + или * в поле поиска компонентов происходит ошибка:
Можно протестировать на официальном примере.