Skip to content

Commit

Permalink
[Autocomplete] Move useAutocomplete to unstyled package
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Jul 28, 2021
1 parent 5e6d955 commit 99fd646
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as useAutocomplete } from './useAutocomplete';
export * from './useAutocomplete';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as useAutocomplete, createFilterOptions } from './useAutocomplete';
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/* eslint-disable no-constant-condition */
import * as React from 'react';
import { setRef, useEventCallback, useControlled, unstable_useId as useId } from '../utils';
import {
unstable_setRef as setRef,
unstable_useEventCallback as useEventCallback,
unstable_useControlled as useControlled,
unstable_useId as useId,
} from '@material-ui/utils';

// https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript
// Give up on IE11 support for this feature
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import useAutocomplete, { FilterOptionsState } from '@material-ui/core/useAutocomplete';
import { useAutocomplete, FilterOptionsState } from '@material-ui/unstyled/AutocompleteUnstyled';
import { expectType } from '@material-ui/types';

interface Person {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { expect } from 'chai';
import { createClientRender, screen, ErrorBoundary } from 'test/utils';
import useAutocomplete, { createFilterOptions } from '@material-ui/core/useAutocomplete';
import { useAutocomplete, createFilterOptions } from '@material-ui/unstyled/AutocompleteUnstyled';

describe('useAutocomplete', () => {
const render = createClientRender();
Expand Down
2 changes: 2 additions & 0 deletions packages/material-ui-unstyled/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export * from './AutocompleteUnstyled';

export { default as BackdropUnstyled } from './BackdropUnstyled';
export * from './BackdropUnstyled';

Expand Down
2 changes: 2 additions & 0 deletions packages/material-ui-unstyled/src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export * from './AutocompleteUnstyled';

export { default as BackdropUnstyled } from './BackdropUnstyled';
export * from './BackdropUnstyled';

Expand Down

0 comments on commit 99fd646

Please sign in to comment.