fix(plugin): onSearch listener when clicking on reaction (MIN-314)
When clicking on a reaction onSearch listener is called for a plugin. To the data provided to the listener callback argument added data about reaction itself in addition to bioEntities connected to reaction.
Closes MIN-314
Merge request reports
Activity
assigned to @mateusz-winiarczyk
56 56 ) 57 57 ).unwrap().then((bioEntityContents) => { 58 58 PluginsEventBus.dispatchEvent('onSearch', { 59 type: 'bioEntity', 59 type: 'reaction', 60 60 searchValues: [closestSearchResult], 61 results: [bioEntityContents], 61 results: [[...bioEntityContents, reaction]], Each array in results inside array corresponds to each individual searchValues. 1 element in searchValues corresponds to the first arrary in results. This is the schema agreed with Piotr: link This is solved this way because when searching with input in TopBar, e.g. with the phrase
NR4A2;SNCA;aspirin;morphine
, we have several elements in the results and the data returned for each individual element of the phrase is thrown into a separate array. For example, for NR4A2 it will be the first array in results
added 11 commits
-
5517f4a7...535217d5 - 10 commits from branch
development
- 012f7afd - Merge remote-tracking branch 'origin/development' into...
-
5517f4a7...535217d5 - 10 commits from branch
mentioned in commit 9def2152