Skip to content

Commit

Permalink
Combobox: move to react-next/react (#15490)
Browse files Browse the repository at this point in the history
* Combobox: Move combobox to react

* Change files
  • Loading branch information
joschect authored Oct 13, 2020
1 parent 72907bf commit fc06f6c
Show file tree
Hide file tree
Showing 29 changed files with 1,102 additions and 7,194 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Combobox: Move combobox to react",
"packageName": "@fluentui/react",
"email": "[email protected]",
"dependentChangeType": "patch",
"date": "2020-10-13T06:23:54.863Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Combobox: Move combobox to react",
"packageName": "@fluentui/react-internal",
"email": "[email protected]",
"dependentChangeType": "patch",
"date": "2020-10-13T06:23:47.141Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "Combobox: Move combobox to react",
"packageName": "@fluentui/react-next",
"email": "[email protected]",
"dependentChangeType": "patch",
"date": "2020-10-13T06:23:50.313Z"
}
21 changes: 5 additions & 16 deletions packages/react-internal/etc/react-internal.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export class Autofill extends React.Component<IAutofillProps, IAutofillState> im
// (undocumented)
focus(): void;
// (undocumented)
static getDerivedStateFromProps(props: IAutofillProps, state: IAutofillState): IAutofillState | null;
// (undocumented)
readonly inputElement: HTMLInputElement | null;
// (undocumented)
readonly isValueSelected: boolean;
Expand All @@ -100,13 +102,7 @@ export class Autofill extends React.Component<IAutofillProps, IAutofillState> im
// (undocumented)
readonly selectionStart: number | null;
// (undocumented)
UNSAFE_componentWillReceiveProps(nextProps: IAutofillProps): void;
// (undocumented)
readonly value: string;
}

// @public @deprecated (undocumented)
export class BaseAutoFill extends Autofill {
}

// @public (undocumented)
Expand Down Expand Up @@ -1146,26 +1142,19 @@ export interface IAutofillProps extends React.InputHTMLAttributes<HTMLInputEleme
componentRef?: IRefObject<IAutofill>;
defaultVisibleValue?: string;
enableAutofillOnKeyPress?: KeyCodes[];
onInputChange?: (value: string, composing: boolean) => string;
onInputChange?: (value: string, composing: boolean) => string | void;
onInputValueChange?: (newValue?: string, composing?: boolean) => void;
preventValueSelection?: boolean;
shouldSelectFullInputValueInComponentDidUpdate?: () => boolean;
suggestedDisplayValue?: string;
// @deprecated
updateValueInWillReceiveProps?: () => string | null;
}

// @public (undocumented)
export interface IAutofillState {
// (undocumented)
displayValue?: string;
}

// @public @deprecated
export interface IBaseAutoFill extends IAutofill {
}

// @public @deprecated
export interface IBaseAutoFillProps extends IAutofillProps {
inputValue: string;
}

// @public (undocumented)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ describe('Autofill', () => {
target: autofill.inputElement!,
nativeEvent: {
isComposing: true,

// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any,
});

Expand All @@ -183,6 +185,7 @@ describe('Autofill', () => {
target: autofill.inputElement!,
nativeEvent: {
isComposing: true,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any,
});
jest.runOnlyPendingTimers();
Expand All @@ -192,13 +195,15 @@ describe('Autofill', () => {
which: KeyCodes.m,
nativeEvent: {
isComposing: true,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any,
});
autofill.inputElement!.value = '🆘m';
ReactTestUtils.Simulate.input(autofill.inputElement!, {
target: autofill.inputElement!,
nativeEvent: {
isComposing: true,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any,
});

Expand All @@ -208,6 +213,7 @@ describe('Autofill', () => {
target: autofill.inputElement!,
nativeEvent: {
isComposing: false,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any,
});
jest.runOnlyPendingTimers();
Expand Down
Loading

0 comments on commit fc06f6c

Please sign in to comment.