Skip to content

Commit

Permalink
forms: add missing enum in porting BaseViewElement to view components
Browse files Browse the repository at this point in the history
Signed-off-by: Patrizio Bekerle <[email protected]>
  • Loading branch information
pbek committed Feb 14, 2025
1 parent b61527b commit 4df654a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/baseObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import '@dbp-toolkit/form-elements';
import {createInstance} from './i18n';
import * as commonStyles from '@dbp-toolkit/common/styles';
import * as formElements from './objectTypes/formElements';
import * as viewElements from './objectTypes/viewElements';
import {classMap} from 'lit/directives/class-map.js';
import {getIconSVGURL} from './utils.js';
import {gatherFormDataFromElement, validateRequiredFields} from '@dbp-toolkit/form-elements/src/utils.js';
Expand Down Expand Up @@ -568,7 +567,12 @@ export class BaseViewElement extends ScopedElementsMixin(DBPLitElement) {
const baseData = fileData.base || {};

return html`
${viewElements.enumElement(this._i18n.t('doc-modal-document-type'), baseData.additionalType?.key || '', this.additionalTypes)}
<dbp-form-enum-view
subscribe="lang"
label=${this._i18n.t('doc-modal-document-type')}
.value=${baseData.additionalType?.key || ''}
.items=${this.additionalTypes}>
</dbp-form-enum-view>
${this.getCustomViewElements()}
${this.getCommonViewElements()}
`;
Expand Down

0 comments on commit 4df654a

Please sign in to comment.