Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combobox: move to react-next/react #15490

Merged
merged 2 commits into from
Oct 13, 2020
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,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