feat(navigation): allow updating views
Use-case example:
SearchView.update({
emptyCaption: t('files', 'No results found for "{searchText}"', { searchText }),
})
Not sure, if its not better to let the view itself update
What do you mean ?
Also there needs to be a way to detect the update
I can emit an updated event sure.
this only works currently with vue 2 reactivity
Fixed
Basically the question is what do we want the view to be.
Just a state-less data exchange as it is currently or to be state-full.
For most views this is not really necessary, but some like the folder tree or the search view are more or less stateful.
If we want to allow the view to have a state then the view should update itself and not need external update calls. Because then you need to track the view state externally.
How do you suggest the view update itself ?
Well it could just return another value for the field and emit an event if it changed internally, similar to #1067
But I am also fine with this solution!
I am just not sure if an evenbus event is the right type or if we should just use an native event like its done on the navigation.
So, this was mostly useful for https://github.com/nextcloud/server/pull/53739