Skip to content

Commit

Permalink
fix(carousel): fix variables propagation (#16084)
Browse files Browse the repository at this point in the history
#### Pull request checklist

- [x] Addresses an existing issue: Fixes #15992
- [ ] Include a change request file using `$ yarn change`

#### Description of changes

`variables` weren't being passed down to paddles, this is fixed by passing it to `overrideProps`

#### Focus areas to test

(optional)
  • Loading branch information
assuncaocharles authored Dec 2, 2020
1 parent bf33fbd commit bc3349b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/fluentui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Fix shorthand `id` prop not being passed to control in `FormField` component @assuncaocharles ([#16003](https://github.com/microsoft/fluentui/pull/16003))
- Fix outdated `onChange` call in `RadioGroupItem` @assuncaocharles ([#15997](https://github.com/microsoft/fluentui/pull/15997))
- Fix `Dropdown` to not break new lines for button trigger after listbox was introduced wrapping selected items @assuncaocharles ([#15898](https://github.com/microsoft/fluentui/pull/15898))
- Fix `Input` content overlaping with `Icon` @assuncaocharles ([#16083](https://github.com/microsoft/fluentui/pull/16083))
- Fix `variables` not being propagated in `Carousel` @assuncaocharles ([#16084](https://github.com/microsoft/fluentui/pull/16084))

### Features
- `Tree`: added `useTree` hook @yuanboxue-amber ([#15831](https://github.com/microsoft/fluentui/pull/15831))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
useTelemetry,
useUnhandledProps,
useStateManager,
mergeVariablesOverrides,
} from '@fluentui/react-bindings';
import { createCarouselManager, CarouselState, CarouselActions } from '@fluentui/state';

Expand Down Expand Up @@ -364,6 +365,7 @@ export const Carousel: ComponentWithAs<'div', CarouselProps> &
};

const handlePaddleOverrides = (predefinedProps: CarouselPaddleProps, paddleName: string) => ({
variables: mergeVariablesOverrides(variables, predefinedProps.variables),
onClick: (e: React.SyntheticEvent, paddleProps: CarouselPaddleProps) => {
_.invoke(predefinedProps, 'onClick', e, paddleProps);
if (paddleName === 'paddleNext') {
Expand Down

0 comments on commit bc3349b

Please sign in to comment.