Imroved UI of required and optional enum
This commit is contained in:
parent
5f6c5f8663
commit
f6568b3cf5
|
@ -169,8 +169,11 @@ $logs = $this->getParam('logs', null);
|
||||||
</template>
|
</template>
|
||||||
<template x-if="attr.format === 'enum'">
|
<template x-if="attr.format === 'enum'">
|
||||||
<select
|
<select
|
||||||
|
:required="attr.required"
|
||||||
:name="attr.key"
|
:name="attr.key"
|
||||||
data-cast-to="string">
|
data-cast-to="string">
|
||||||
|
<option :disabled="attr.required" selected label=" "></option>
|
||||||
|
|
||||||
<template x-for="element in attr.elements">
|
<template x-for="element in attr.elements">
|
||||||
<option
|
<option
|
||||||
:value="element"
|
:value="element"
|
||||||
|
@ -261,9 +264,12 @@ $logs = $this->getParam('logs', null);
|
||||||
</template>
|
</template>
|
||||||
<template x-if="attr.format === 'enum'">
|
<template x-if="attr.format === 'enum'">
|
||||||
<select
|
<select
|
||||||
|
:required="attr.required"
|
||||||
:name="attr.key"
|
:name="attr.key"
|
||||||
data-cast-to="string">
|
data-cast-to="string">
|
||||||
<template x-for="element in attr.elements">
|
<template x-for="element in attr.elements">
|
||||||
|
<option :disabled="attr.required" selected label=" "></option>
|
||||||
|
|
||||||
<option
|
<option
|
||||||
:value="element"
|
:value="element"
|
||||||
x-text="element"
|
x-text="element"
|
||||||
|
|
Loading…
Reference in a new issue