Dynamically get dropdown width in updateDropdownOffset for filtered search
It would be ideal to change the code in updateDropdownOffset
such that we can get the dropdown width even though it is set to display: none. This would make the javascript code more robust as we would no longer need to hard code width values