Skip to content

Commit

Permalink
Fix select field type (#5217)
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie authored Mar 24, 2021
1 parent 0e01f47 commit da90077
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/moody-apricots-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/fields': major
---

Fixed the `select` field type to always use the correct underlying types.
4 changes: 2 additions & 2 deletions packages-next/fields/src/types/select/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-ignore
import { Text } from '@keystone-next/fields-legacy';
import { Select } from '@keystone-next/fields-legacy';
import type { FieldType, BaseGeneratedListTypes, FieldDefaultValue } from '@keystone-next/types';
import { resolveView } from '../../resolve-view';
import type { FieldConfig } from '../../interfaces';
Expand Down Expand Up @@ -30,7 +30,7 @@ export type SelectFieldConfig<
export const select = <TGeneratedListTypes extends BaseGeneratedListTypes>(
config: SelectFieldConfig<TGeneratedListTypes>
): FieldType<TGeneratedListTypes> => ({
type: Text,
type: Select,
config,
views: resolveView('select/views'),
getAdminMeta: () => ({
Expand Down

1 comment on commit da90077

@vercel
Copy link

@vercel vercel bot commented on da90077 Mar 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.