diff --git a/src/components/PinInput/PinInput.tsx b/src/components/PinInput/PinInput.tsx index c3386c9744..a73ca16578 100644 --- a/src/components/PinInput/PinInput.tsx +++ b/src/components/PinInput/PinInput.tsx @@ -18,7 +18,6 @@ export type PinInputType = 'numeric' | 'alphanumeric'; export interface PinInputApi { focus: () => void; - blur: () => void; } export interface PinInputProps extends DOMProps, AriaLabelingProps, QAProps { @@ -240,14 +239,6 @@ export const PinInput = React.forwardRef((props, focus: () => { refs.current[activeIndex]?.focus(); }, - blur: () => { - if ( - document.activeElement && - document.activeElement === refs.current[activeIndex] - ) { - refs.current[activeIndex]?.blur(); - } - }, }), [activeIndex], ); diff --git a/src/components/PinInput/README.md b/src/components/PinInput/README.md index 868926746a..5f4876929b 100644 --- a/src/components/PinInput/README.md +++ b/src/components/PinInput/README.md @@ -160,7 +160,6 @@ If you want the browser to suggest "one time codes" from the outer context (e.g. ## API - `focus(): void` - Set focus to the current active input. -- `blur(): void` - Remove focus from the current active input. ## Properties diff --git a/src/components/PinInput/__tests__/PinInput.test.tsx b/src/components/PinInput/__tests__/PinInput.test.tsx index 1661b4b92e..6e92c2a56a 100644 --- a/src/components/PinInput/__tests__/PinInput.test.tsx +++ b/src/components/PinInput/__tests__/PinInput.test.tsx @@ -286,18 +286,5 @@ describe('PinInput', () => { }); expect(inputs[1]).toHaveFocus(); }); - - test('blur', async () => { - const user = userEvent.setup(); - const apiRef: React.RefObject = {current: null}; - renderComponent(); - - await user.click(inputs[1]); - expect(inputs[1]).toHaveFocus(); - act(() => { - apiRef.current?.blur(); - }); - expect(inputs[1]).not.toHaveFocus(); - }); }); });