Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: secondaryContent not displaying properly #33689

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
bsunderhus marked this conversation as resolved.
Show resolved Hide resolved
"type": "patch",
"comment": "bugfix: secondaryContent not displaying properly",
"packageName": "@fluentui/react-tag-picker",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`TagPickerOption renders a default state 1`] = `
<div>
<div
aria-selected="false"
class="fui-TagPickerOption fui-Option"
bsunderhus marked this conversation as resolved.
Show resolved Hide resolved
class="fui-Option fui-TagPickerOption"
id="fluent-option8"
role="option"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { makeStyles, mergeClasses } from '@griffel/react';
import type { SlotClassNames } from '@fluentui/react-utilities';
import type { TagPickerOptionSlots, TagPickerOptionState } from './TagPickerOption.types';
import { useOptionStyles_unstable } from '@fluentui/react-combobox';
import { typographyStyles } from '@fluentui/react-theme';

export const tagPickerOptionClassNames: SlotClassNames<TagPickerOptionSlots> = {
root: 'fui-TagPickerOption',
Expand All @@ -22,6 +23,7 @@ const useStyles = makeStyles({
secondaryContent: {
gridColumnStart: 2,
gridRowStart: 2,
...typographyStyles.caption1,
},

media: {
Expand All @@ -35,6 +37,9 @@ const useStyles = makeStyles({
export const useTagPickerOptionStyles_unstable = (state: TagPickerOptionState): TagPickerOptionState => {
'use no memo';

const styles = useStyles();

state.root.className = mergeClasses(tagPickerOptionClassNames.root, styles.root, state.root.className);
useOptionStyles_unstable({
...state,
active: false,
Expand All @@ -43,9 +48,6 @@ export const useTagPickerOptionStyles_unstable = (state: TagPickerOptionState):
checkIcon: undefined,
selected: false,
});
const styles = useStyles();

state.root.className = mergeClasses(tagPickerOptionClassNames.root, styles.root, state.root.className);
if (state.media) {
state.media.className = mergeClasses(tagPickerOptionClassNames.media, styles.media, state.media.className);
}
Expand Down
Loading