Enhance FieldOptions Component with Conditional Placeholder Input (#773)
- Added a conditional rendering for a `text-area-input` for placeholder text when the field type is 'text' and supports multiple lines, improving user experience in form customization. - Updated the existing `text-input` to use `v-else-if` for better logical flow in rendering based on the presence of a placeholder. These changes aim to enhance the flexibility of the FieldOptions component by providing users with more options for input placeholders. Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
parent
a11fb01bef
commit
705bff439e
|
|
@ -501,8 +501,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Placeholder -->
|
<!-- Placeholder -->
|
||||||
|
<text-area-input
|
||||||
|
v-if="hasPlaceholder && field.type === 'text' && field.multi_lines"
|
||||||
|
name="placeholder"
|
||||||
|
class="mt-3"
|
||||||
|
:form="field"
|
||||||
|
label="Empty Input Text (Placeholder)"
|
||||||
|
/>
|
||||||
<text-input
|
<text-input
|
||||||
v-if="hasPlaceholder"
|
v-else-if="hasPlaceholder"
|
||||||
name="placeholder"
|
name="placeholder"
|
||||||
class="mt-3"
|
class="mt-3"
|
||||||
:form="field"
|
:form="field"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue