From 8996fd085a8ca0a7a8abf699a9b31db9b8fa0543 Mon Sep 17 00:00:00 2001 From: keyan Date: Wed, 3 Jan 2024 16:12:33 -0600 Subject: [PATCH] fix #703 --- api/resolvers/item.js | 3 ++- components/form.js | 4 ++-- components/sub-select.js | 7 ++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/api/resolvers/item.js b/api/resolvers/item.js index 279d2c26..7ae4efca 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -194,7 +194,7 @@ export const muteClause = me => const subClause = (sub, num, table, me) => { return sub - ? `${table ? `"${table}".` : ''}"subName" = $${num}` + ? `${table ? `"${table}".` : ''}"subName" = $${num}::CITEXT` : me ? `NOT EXISTS (SELECT 1 FROM "MuteSub" WHERE "MuteSub"."userId" = ${me.id} AND "MuteSub"."subName" = ${table ? `"${table}".` : ''}"subName")` : '' @@ -504,6 +504,7 @@ export default { } break } + return { cursor: items.length === limit ? nextCursorEncoded(decodedCursor) : null, items, diff --git a/components/form.js b/components/form.js index 081b036a..d1f1c6bd 100644 --- a/components/form.js +++ b/components/form.js @@ -855,11 +855,11 @@ export function Select ({ label, items, groupClassName, onChange, noForm, overri if (item && typeof item === 'object') { return ( - {item.items.map(item => )} + {item.items.map(item => )} ) } else { - return + return } })} diff --git a/components/sub-select.js b/components/sub-select.js index aba94a94..da2acf3b 100644 --- a/components/sub-select.js +++ b/components/sub-select.js @@ -64,16 +64,17 @@ export default function SubSelect ({ prependSubs, sub, onChange, appendSubs, fil const subs = useSubs({ prependSubs, sub, filterSubs, appendSubs }) const valueProps = props.noForm ? { - value: sub + value: sub.toLowerCase() } : { - overrideValue: sub + overrideValue: sub.toLowerCase() } return (