Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move type definition
  • Loading branch information
ntsekouras committed Sep 4, 2025
commit c42e9725aaf1bd4f4836e4dc3b2a2cf8717b287d
9 changes: 8 additions & 1 deletion packages/dataviews/src/dataform-controls/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ import { useCallback, useState } from '@wordpress/element';
/**
* Internal dependencies
*/
import type { DataFormInputControlProps } from '../types';
import type { DataFormControlProps } from '../types';
import { unlock } from '../lock-unlock';

const { ValidatedTextControl } = unlock( privateApis );

export type DataFormInputControlProps< Item > = DataFormControlProps< Item > & {
/**
* The input type of the control.
*/
type?: 'text' | 'email' | 'tel';
};

export default function Input< Item >( {
data,
field,
Expand Down
7 changes: 0 additions & 7 deletions packages/dataviews/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,6 @@ export type DataFormControlProps< Item > = {
operator?: Operator;
};

export type DataFormInputControlProps< Item > = DataFormControlProps< Item > & {
/**
* The input type of the control.
*/
type?: 'text' | 'email' | 'tel';
};

export type DataViewRenderFieldProps< Item > = {
item: Item;
field: NormalizedField< Item >;
Expand Down
Loading