Skip to content

Commit

Permalink
fix(ChatMessage): use chat context as default value when user prop is…
Browse files Browse the repository at this point in the history
… explicitly undefined (#21189)

* fix input prop sequence

* chglog
  • Loading branch information
YuanboXue-Amber authored Jan 6, 2022
1 parent 18549da commit dc00ff8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/fluentui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [Unreleased]

### Fixes
- Fix `ChatMessage` to use chat context as default value when user prop is explicitly undefined @yuanboxue-amber ([#21189](https://github.com/microsoft/fluentui/pull/21189))
- bump react-transition-group from 4.3.0 to 4.4.1 @yuanboxue-amber ([#21187](https://github.com/microsoft/fluentui/pull/21187))


<!--------------------------------[ v0.60.0 ]------------------------------- -->
## [v0.60.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-northstar_v0.60.0) (2021-12-14)
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-northstar_v0.59.0..@fluentui/react-northstar_v0.60.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,12 @@ export const ChatMessage = (React.forwardRef<HTMLDivElement, ChatMessageProps>((
});

const props = {
density: chatProps.density,
accessibility: chatProps.accessibility || chatMessageBehavior,
...inputProps,
density: inputProps.density === undefined ? chatProps.density : inputProps.density,
accessibility:
inputProps.accessibility === undefined
? chatProps.accessibility || chatMessageBehavior
: inputProps.accessibility,
};
const {
accessibility,
Expand Down

0 comments on commit dc00ff8

Please sign in to comment.