From 889fb9b2ff4ce8b793e3ed3c0a5dd39b78229e7d Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Tue, 11 Aug 2020 14:25:35 -0400 Subject: [PATCH] StyleInput: fix passing of unsupported DOM attributes to select content We were erroneously passing react-dropdown-select methods into content divs rendered by contentRenderer. They were not necessary, as the component already handles basic select methods natively. --- src/components/StyleInput/StyleInput.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/StyleInput/StyleInput.tsx b/src/components/StyleInput/StyleInput.tsx index e3f9cc0..61d32a1 100644 --- a/src/components/StyleInput/StyleInput.tsx +++ b/src/components/StyleInput/StyleInput.tsx @@ -57,11 +57,18 @@ const StyleInput: React.FC = () => { searchable={false} labelField="key" onChange={(values) => setStyle(values[0].value as IconStyle)} - itemRenderer={({ item, itemIndex, state: { cursor, values }, methods }) => ( + itemRenderer={({ + item, + itemIndex, + state: { cursor, values }, + methods, + }) => ( methods.addItem(item)} > @@ -69,8 +76,8 @@ const StyleInput: React.FC = () => { {item.key} )} - contentRenderer={({ state: { values }, methods }) => ( -
+ contentRenderer={({ state: { values } }) => ( +
{values[0].icon} {values[0].key}