I am currently trying to use an ipyvuetify FileInput field. My expectation was that if I were to define v_model, that I would be then able to read the selected file from filefield via the v_model attribute.
import ipyvuetify as v
def file_selected(x,y,z):
print(filefield.v_model) # value is {}
print(x) # value is FileInput(placeholder='Select an file...', v_model={})
print(y) # value is 'change'
print(z) # value is {}
filefield = v.FileInput(v_model='', placeholder = 'Select an file...')
filefield.on_event('change', file_selected)
What I find when I execute this code however, is that filefield.v_model is an empty dictionary. There are three arguments passed to the 'change' event, but none of them seem to contain 'what' file has been selected. How do you get the selected file from a ipyvuetify FileInput?