Skip to content

Commit 9fd798d

Browse files
committed
fix: fix memoization for giphyActive property on InputButtons
1 parent 55d719e commit 9fd798d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

package/src/components/MessageInput/InputButtons.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ const areEqual = <
127127
nextProps: InputButtonsWithContextProps<At, Ch, Co, Ev, Me, Re, Us>,
128128
) => {
129129
const {
130+
giphyActive: prevGiphyActive,
130131
hasCommands: prevHasCommands,
131132
hasFilePicker: prevHasFilePicker,
132133
hasImagePicker: prevHasImagePicker,
@@ -137,6 +138,7 @@ const areEqual = <
137138
} = prevProps;
138139

139140
const {
141+
giphyActive: nextGiphyActive,
140142
hasCommands: nextHasCommands,
141143
hasFilePicker: nextHasFilePicker,
142144
hasImagePicker: nextHasImagePicker,
@@ -173,6 +175,10 @@ const areEqual = <
173175
return false;
174176
}
175177

178+
if (prevGiphyActive !== nextGiphyActive) {
179+
return false;
180+
}
181+
176182
return true;
177183
};
178184

0 commit comments

Comments
 (0)