Skip to content

Commit

Permalink
Fix boolean field default interface name
Browse files Browse the repository at this point in the history
Fixes #5643
  • Loading branch information
rijkvanzanten committed May 22, 2021
1 parent 246c552 commit 5506214
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-seahorses-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@directus/app': patch
---

Fixed issue where boolean type fields without an interface configured would default to the wrong interface.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default defineComponent({
const recommendedInterfacesPerType: { [type: string]: string[] } = {
string: ['input', 'select-dropdown'],
text: ['input-rich-text-html'],
boolean: ['toggle'],
boolean: ['boolean'],
integer: ['input'],
bigInteger: ['input'],
float: ['input'],
Expand Down
2 changes: 1 addition & 1 deletion app/src/utils/get-default-interface-for-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const defaultInterfaceMap: Record<typeof types[number], string> = {
alias: 'input',
bigInteger: 'input',
binary: 'input',
boolean: 'toggle',
boolean: 'boolean',
date: 'datetime',
dateTime: 'datetime',
decimal: 'input',
Expand Down

0 comments on commit 5506214

Please sign in to comment.