fix: Aggiunta opzione vuota se la select è facoltativa
This commit is contained in:
parent
5c2dfff3cf
commit
6ab2925d5f
|
@ -613,9 +613,14 @@ export class RecordsPage extends Page {
|
|||
.first();
|
||||
|
||||
const select = section.fields[field.id] as SelectT;
|
||||
let {options} = select;
|
||||
// eslint-disable-next-line prefer-const
|
||||
let {options, required} = select;
|
||||
const {relationship} = select;
|
||||
|
||||
if (!required) {
|
||||
list.push(<mwc-list-item key="null" value=""/>);
|
||||
}
|
||||
|
||||
if (Array.isArray(relationship) && relationship.length === 2) {
|
||||
options = this.getModelSelectOptions(relationship[0], relationship[1]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue