Skip to content

Commit

Permalink
fix(*): added autocomplete="off" attribute (#884)
Browse files Browse the repository at this point in the history
  • Loading branch information
v-gevak authored Oct 10, 2023
1 parent 76b5779 commit 9d5e5b7
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .changeset/eleven-ties-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@alfalab/core-components-calendar-input': patch
'@alfalab/core-components-date-range-input': patch
'@alfalab/core-components-date-time-input': patch
'@alfalab/core-components-universal-date-input': patch
---

Добавлен атрибут autocomplete='off'
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ exports[`CalendarInput Display tests should match snapshot 1`] = `
class="input"
>
<input
autocomplete="off"
class="input input input"
inputmode="decimal"
pattern="[0-9\\\\.]*"
Expand Down Expand Up @@ -88,6 +89,7 @@ Object {
class="input"
>
<input
autocomplete="off"
class="input input input"
inputmode="decimal"
pattern="[0-9\\\\.]*"
Expand Down Expand Up @@ -149,6 +151,7 @@ Object {
class="input"
>
<input
autocomplete="off"
class="input input input"
inputmode="decimal"
pattern="[0-9\\\\.]*"
Expand Down Expand Up @@ -263,6 +266,7 @@ Object {
class="input"
>
<input
autocomplete="off"
class="input input input"
inputmode="decimal"
pattern="[0-9\\\\.]*"
Expand Down Expand Up @@ -320,6 +324,7 @@ Object {
class="input"
>
<input
autocomplete="off"
class="input input input"
inputmode="decimal"
pattern="[0-9\\\\.]*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ export const CalendarInput = forwardRef<HTMLInputElement, CalendarInputProps>(
data-test-id={dataTestId}
>
<DateInput
autoComplete='off'
{...restProps}
ref={mergeRefs([inputRef, ref])}
wrapperRef={mergeRefs([wrapperRef, inputWrapperRef])}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ export const DateRangeInput = React.forwardRef<HTMLInputElement, DateRangeInputP
>
{InputComponent ? (
<InputComponent
autoComplete={picker ? 'off' : undefined}
{...restProps}
block={block}
ref={mergeRefs([ref, inputRef])}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ export const DateTimeInput = React.forwardRef<HTMLInputElement, DateTimeInputPro
>
{InputComponent ? (
<InputComponent
autoComplete={picker ? 'off' : undefined}
{...restProps}
block={block}
ref={mergeRefs([ref, inputRef])}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export const BaseUniversalDateInput = forwardRef<HTMLInputElement, BaseUniversal
const inputDisabled = disabled || readOnly;

const commonProps = {
autoComplete: picker ? 'off' : undefined,
disableUserInput,
autoCorrection,
disabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ export const DateRangeInput = forwardRef<HTMLInputElement, InnerDateRangeInputPr
data-test-id={getDataTestId(dataTestId, 'wrapper')}
>
<Input
placeholder={`ДД.ММ.ГГГГ${DATE_RANGE_SEPARATOR}ДД.ММ.ГГГГ`}
{...restProps}
dataTestId={dataTestId}
breakpoint={breakpoint}
Expand Down

0 comments on commit 9d5e5b7

Please sign in to comment.