Skip to content

Commit

Permalink
Merge pull request #366 from 1CRM/editable-toggle-switch-mode
Browse files Browse the repository at this point in the history
fixed BaseFieldProps add switch and outside
  • Loading branch information
alexivanenko authored Feb 5, 2024
2 parents 42a7ace + 9893ea7 commit 96a67f9
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 96a67f9

Please sign in to comment.