A search engine for MMP's eASLRB.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
asl-rulebook2/asl_rulebook2/webapp/static/NavPane.js

34 lines
823 B

import { gMainApp, gEventBus } from "./MainApp.js" ;
// --------------------------------------------------------------------
gMainApp.component( "nav-pane", {
data() { return {
seqNo: 0, // nb: for the test suite
} ; },
template: `
<tabbed-pages>
<tabbed-page tabId="search" caption="Search" data-display="flex" >
<search-box id="search-box" @search=onSearch />
<search-results id="search-results" :data-seqno=seqNo />
</tabbed-page>
</tabbed-pages>`,
mounted() {
gEventBus.on( "search-done", () => {
// notify the test suite that the search results are now available
this.seqNo += 1 ;
} ) ;
},
methods: {
onSearch( queryString ) {
gEventBus.emit( "search", queryString ) ;
},
},
} ) ;