How to only display certain extension file

I want to display file tree, only displaying certain extension files. for example, my original file tree is as follows
I want to execute a command and only show my.custom file in my file tree as follows
I have seen the source code FileNavigatorTree.ts file, it uses FileNavigatorFilter, but the filter uses the exclude rules, it can exclude files but not include files. should I rewrite my own filter? or any other better solution?