In T405731 we refactored our use of CdxLookup components so that lookups populated by Wikibase API responses use a common component - the apiItemLookup component.
This component takes a lookupSource as a property, and the lookupSource needs to be able to watch changes to the text input of the CdxLookup.
The current implementation uses @input="onInput" to update the lookupSource's lookupInputValue, but also uses v-model:input-value="lookupInputValue" to bind the same. The @input="onInput" should be redundant, and is unnecessary if the lookup is visible when the edit form loads. But without the @input declaration the lookupSource is not able to watch changes to the text input if the CdxLookup is loaded later (e.g. after switching from a novalue to a somevalue snak).
Steps to reproduce
- remove the @input="onInput" from the apiItemLookup
- edit a statement that has a novalue snak for a lookup property (e.g. entity or tabular-data / geo-shape)
- change the novalue to custom
- type in the input box
- observe that the search is not triggered and the drop-down remains empty.
Acceptance Criteria
- The apiItemLookup should work in all situations, without the double watch - either v-model:input-value= or @input= should be used
Note: As there is a working solution and since this is technically an investigation, we've added a timebox :
Timebox: 4 hours