Skip to content

Commit

Permalink
fix: remove invalid props from dom
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Koshelkov committed Jan 14, 2025
1 parent b471259 commit c334a18
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/weak-starfishes-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@alfalab/core-components-picker-button': patch
'@alfalab/core-components-tabs': patch
---

Убрана передача невалидных пропсов в DOM
1 change: 1 addition & 0 deletions packages/picker-button/src/field/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const Field = ({
labelView,
FormControlComponent,
icon,
onClear,
...restProps
}: FieldProps) => {
const Icon: ComponentType<SVGProps<SVGSVGElement>> = getIcon(
Expand Down
2 changes: 2 additions & 0 deletions packages/tabs/src/components/title/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const Title = forwardRef<HTMLButtonElement, Props>(
showSkeleton = false,
skeletonProps,
onResize,
dataTestId,
...restProps
},
ref,
Expand Down Expand Up @@ -67,6 +68,7 @@ export const Title = forwardRef<HTMLButtonElement, Props>(
return hidden ? null : (
<button
{...restProps}
data-test-id={dataTestId}
ref={mergeRefs([ref, buttonRef])}
disabled={disabled || showSkeleton}
type='button'
Expand Down
2 changes: 1 addition & 1 deletion packages/tabs/src/hooks/use-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function useTabs({ titles = [], selectedId, onChange }: UseTabsProps) {
tabIndex: itemSelected ? 0 : -1,
'aria-selected': itemSelected,
selected: itemSelected,
'data-test-id': getDataTestId(item.dataTestId, 'toggle'),
dataTestId: getDataTestId(item.dataTestId, 'toggle'),
disabled: item.disabled,
ref: mergeRefs(refs),
onKeyDown: handleKeyDown,
Expand Down

0 comments on commit c334a18

Please sign in to comment.