#631 translate changes

This commit is contained in:
agriyadev5
2021-08-30 20:06:59 +05:30
parent 7fc2c93693
commit c60c5847a0
6 changed files with 78 additions and 43 deletions

View File

@@ -46,7 +46,7 @@ export class SeList extends HTMLElement {
* @returns {any} observed
*/
static get observedAttributes () {
return [ 'label', 'width', 'height' ];
return [ 'label', 'width', 'height', 'title' ];
}
/**
@@ -59,6 +59,9 @@ export class SeList extends HTMLElement {
attributeChangedCallback (name, oldValue, newValue) {
if (oldValue === newValue) return;
switch (name) {
case 'title':
this.$dropdown.setAttribute('title', `${t(newValue)}`);
break;
case 'label':
this.$label.textContent = t(newValue);
break;
@@ -74,6 +77,21 @@ export class SeList extends HTMLElement {
break;
}
}
/**
* @function get
* @returns {any}
*/
get title () {
return this.getAttribute('title');
}
/**
* @function set
* @returns {void}
*/
set title (value) {
this.setAttribute('title', value);
}
/**
* @function get
* @returns {any}