Addon: how to make Blender run check()/redraw when option changed? Operators have a check() function that Blender calls when it wants to check if it should redraw. Exporters usually use this to attach a file extension to the file name (eg).
I know check() already runs after the user has edited the filename field, or after they click a file in the filepicker. I would like it to run after the user changes an option too. For example, the glTF exporter does this:

If the prop is drawn by the operator.draw() function this happens automatically. However it does not happen automatically if the option is drawn by a separate panel. How can I get it to update in that case?
Here is a complete example you can test with: https://pastebin.com/2k6mBNGz
(PS. I already know how the glTF exporter does it. I'm interested in a &quot;proper&quot; solution.)
Set the filebrowser filename
The code for the ExportHelper mixin class is shown in this question Right way to stop export operator from saving with empty filename?
As demonstrated in question it appears only the FILE_PT_operator is live wired to update the parameters using check.
def update_ext(self, context):
    # if we wish to set filename_ext
    self.filename_ext = f&quot;.{self.extension.lower()}&quot;
    #the filebrowser parameters
    params  = context.space_data.params
    # printed to console
    for k in dir(params):
        print(k, getattr(params, k))
    # set the file name  
    params.filename = f&quot;{Path(self.filepath).stem}.{self.extension.lower()}&quot;   

And use this as an update on the operator enum
extension: bpy.props.EnumProperty(
    name='Extension',
    items=(('FOO', '.foo', '.foo'), ('BAR', '.bar', '.bar')),
    default='FOO',
    update = update_ext,
)

If also using filename_ext make it a property and give it a default to match the enum, however can pretty much do without. The check_existing if set will deal with alerting re pre-existing. (Assume it does haven't checked)
So can pretty much replace the check method to redraw the file browser properties.