Failed implementation of custom cell widget
This commit is contained in:
parent
e7d65b024b
commit
f69bc86ee6
@ -1,13 +1,22 @@
|
|||||||
|
<script>
|
||||||
|
class LDPDisplayCell extends LDPWidget {
|
||||||
|
get template() {
|
||||||
|
return `<div name="${this.name}">${this.value.city} - ${this.value.country}</div>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
customElements.define("ldp-display-cell", LDPDisplayCell);
|
||||||
|
</script>
|
||||||
|
|
||||||
<div id="members" class="view" style="display: none">
|
<div id="members" class="view" style="display: none">
|
||||||
<ldp-display
|
<ldp-display
|
||||||
id="profiles-list"
|
id="profiles-list"
|
||||||
data-src="http://localhost:8000/members/"
|
data-src="http://localhost:8000/members/"
|
||||||
set-name="firstname, name-separator, lastname"
|
set-name="firstname, name-separator, lastname"
|
||||||
value-name-separator=" "
|
value-name-separator=" "
|
||||||
set-location="city, city-separator, country"
|
|
||||||
value-city-separator=", "
|
value-city-separator=", "
|
||||||
data-fields="avatar, name, location"
|
data-fields="avatar, name, cell"
|
||||||
widget-avatar="ldp-display-img"
|
widget-avatar="ldp-display-img"
|
||||||
|
widget-cell="ldp-display-cell"
|
||||||
search-fields="firstname, lastname"
|
search-fields="firstname, lastname"
|
||||||
next="member"
|
next="member"
|
||||||
></ldp-display>
|
></ldp-display>
|
||||||
|
Loading…
Reference in New Issue
Block a user