Custom Media Modal and uploading

I am trying to add a unique custom tab to the Media Uploader using this code.

var customMedia ={
    state: 'customState',
    states: (
            id: 'customState', 
            title: 'Library',
                type: 'image',
                category: 'icon' // adding a filter to ajax_query_attachments_args
            multiple: false,
            date: false,

So far it shows up the Media modal with the images in there as I expected. The issue is when I upload a file by drag and drop it won’t appear on the list of attachments view when the upload finishes, although it does upload the file. And it appears when the page is refreshed.

I added one more state but without the ‘category’ in the query and when I do drag and drop, the image uploads as usual but it appears on the second tab.

Is there anything else I am missing? I tried reading the code for the options that the library receives and couldn’t figure it out.