Replies: 1 comment 5 replies
-
This is how I've implemented filtering: const filter = (query) => {
const bm = editor.Blocks;
const all = bm.getAll();
let filter = all;
query && (filter = all.filter(block => {
return block.get('label').toLowerCase().indexOf(query.toLowerCase()) > -1;
})) ||
(filter = all.filter(block => true));
bm.render(filter);
}; You just need to pass in the |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @artf,
In the block manager lot of components, trouble to find the specific one, please how to add filter in blocks?
Please guide me . It's important to me.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions