Skip to content

Commit bab9e2a

Browse files
committed
Remove isFixed attribute from tags
1 parent 5869e34 commit bab9e2a

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

src/chakra-components/multi-value.tsx

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ const hasVariant = (option: unknown): option is { variant: string } =>
2020
"variant" in option &&
2121
typeof option.variant === "string";
2222

23-
const hasIsFixed = (option: unknown): option is { isFixed: boolean } =>
24-
typeof option === "object" &&
25-
option !== null &&
26-
"isFixed" in option &&
27-
typeof option.isFixed === "boolean";
28-
2923
export const MultiValue = <
3024
Option = unknown,
3125
IsMulti extends boolean = boolean,
@@ -60,7 +54,6 @@ export const MultiValue = <
6054

6155
let optionColorScheme = "";
6256
let optionVariant = "";
63-
let optionIsFixed = false;
6457

6558
if (hasColorScheme(data)) {
6659
optionColorScheme = data.colorScheme;
@@ -70,15 +63,10 @@ export const MultiValue = <
7063
optionVariant = data.variant;
7164
}
7265

73-
if (hasIsFixed(data)) {
74-
optionIsFixed = data.isFixed;
75-
}
76-
7766
const tagStyles = useMultiStyleConfig("Tag", {
7867
size,
7968
colorScheme: optionColorScheme || tagColorScheme,
80-
variant:
81-
optionVariant || tagVariant || (optionIsFixed ? "solid" : "subtle"),
69+
variant: optionVariant || tagVariant,
8270
});
8371

8472
const containerInitialSx: SystemStyleObject = {
@@ -219,11 +207,7 @@ export const MultiValueRemove = <
219207
>(
220208
props: MultiValueRemoveProps<Option, IsMulti, Group>
221209
) => {
222-
const { children, innerProps, isFocused, data, sx } = props;
223-
224-
if (hasIsFixed(data) && data.isFixed) {
225-
return null;
226-
}
210+
const { children, innerProps, isFocused, sx } = props;
227211

228212
return (
229213
<Box

src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,5 @@ export interface ChakraStylesConfig<
9595
export interface OptionBase {
9696
variant?: string;
9797
colorScheme?: string;
98-
isFixed?: boolean;
9998
isDisabled?: boolean;
10099
}

0 commit comments

Comments
 (0)