Skip to content

Commit

Permalink
fixed BaseFieldProps add switch and outside
Browse files Browse the repository at this point in the history
  • Loading branch information
razinabrahamyan committed Feb 5, 2024
1 parent 42a7ace commit 9893ea7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/oceanfront/src/components/Editable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const OfEditableField = defineComponent({
if (type.value === 'toggle') {
return 'editable'
} else {
return active.value ? 'editable' : 'fixed'
return active.value ? 'editable' : props.modelValue?.mode || 'fixed'
}
})
const resizeInput = (focus = false) => {
Expand Down
2 changes: 2 additions & 0 deletions packages/oceanfront/src/lib/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ export const BaseFieldProps = {
formatOptions: null,
defaultValue: null,
sticky: { type: Boolean, default: true },
switch: { type: Boolean, default: false },
outside: { type: Boolean, default: true },
}

export function extendFieldFormat(
Expand Down

0 comments on commit 9893ea7

Please sign in to comment.