Skip to content

Commit

Permalink
wc - Added phenotypes autocomplete to sample create
Browse files Browse the repository at this point in the history
Signed-off-by: gpveronica <[email protected]>
  • Loading branch information
gpveronica committed Oct 24, 2023
1 parent 058c196 commit 0d3eea0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/webcomponents/sample/sample-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,23 @@ export default class SampleCreate extends LitElement {
type: "object-list",
display: {
style: "border-left: 2px solid #0c2f4c; padding-left: 12px; margin-bottom:24px",
// CAUTION 20231024 Vero: "collapsedUpdate" not considered in data-form.js. Perhaps "collapsed" (L1324 in data-form.js) ?
collapsedUpdate: true,
view: phenotype => html`
<div>${phenotype.id} - ${phenotype?.name}</div>
<div class="help-block">${phenotype?.description}</div>`,
<div class="help-block">${phenotype?.description}</div>
`,
search: {
title: "Autocomplete",
button: false,
render: (currentData, dataFormFilterChange) => html`
<cellbase-search-autocomplete
.resource="${"PHENOTYPE"}"
.cellbaseClient="${this.opencgaSession.cellbaseClient}"
@filterChange="${e => dataFormFilterChange(e.detail.data)}">
</cellbase-search-autocomplete>
`,
},
},
elements: [
{
Expand Down

0 comments on commit 0d3eea0

Please sign in to comment.