Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Add static typing to the FocusZoneNativeComponent defaultTabbableElement type for fabric usage of the id/nativeID string type",
"packageName": "@fluentui-react-native/focus-zone",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@

import type { HostComponent, ViewProps } from 'react-native';

import type { Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';

import type { UnsafeMixed } from './codegenTypes';
// Should be:
// import type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';

export interface NativeProps extends ViewProps {
navigateAtEnd?: WithDefault<'NavigateStopAtEnds' | 'NavigateWrap' | 'NavigateContinue', 'NavigateStopAtEnds'>;
defaultTabbableElement?: Int32;
defaultTabbableElement?: UnsafeMixed;
focusZoneDirection?: WithDefault<'bidirectional' | 'vertical' | 'horizontal' | 'none', 'bidirectional'>;
use2DNavigation?: boolean;
tabKeyNavigation?: WithDefault<'None' | 'NavigateWrap' | 'NavigateStopAtEnds' | 'Normal', 'None'>;
Expand Down
2 changes: 2 additions & 0 deletions packages/components/FocusZone/src/codegenTypes.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Separate .d.ts file to fool codegen, since UnsafeMixed does not existing in the TS types of RN currently.
export type UnsafeMixed = any;