Skip to content

Commit

Permalink
Add hidden option to text fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimafisk committed Feb 16, 2023
1 parent 5aa0901 commit 99d9b32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions defaults/core/cms/fields/text.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<script>
export let schema, parentKeys, field;
let disabled;
let disabled, hidden;
if (schema && schema[parentKeys]?.options) {
disabled = schema[parentKeys].options.includes("disabled");
hidden = schema[parentKeys].options.includes("hidden");
}
</script>
Expand All @@ -14,7 +15,7 @@
contenteditable=false
bind:textContent={field}
></div>
{:else}
{:else if !hidden}
<div
class="textarea"
role="textbox"
Expand Down

0 comments on commit 99d9b32

Please sign in to comment.