feat: Multiple Options Paste and Routing Form improvements related to Select fields (#15706)
* Add handlePaste function and integrate it with options fields * Prevents function running if user does not paste a list, allows list items to be pasted without deleting following items * Subs useState for rhf useWatch to fix issues with multiple form fields * Sets options array as optional property in zod schema * Assigns default value to options array to fix possibly undefined type errors * Sets placedholder property as optional * maps selectText to options on mount * Removes comma & semicolon delimiting for pasted lists (new line only) & defines regex as a constant * Sets default value of placeholder to empty string, provides default fallback for component text field if placeholder is omitted. * Fix type error on placeholder * Extracts handlePaste to service function & tests thoroughly * Some improvements and tests arent needed * More fixes * Fix reporting as well * TS fixes * Do transforms to and fro from label * Add unit tests * Unit test reporting * Test Improvements * Self review feedback addressed --------- Co-authored-by: Hariom Balhara <[email protected]> Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
27 files changed
+1221
-228
No files matched your search
@@ -214,7 +214,8 @@ const useBanners = () => {
|
||||
|
||||
const Layout = (props: LayoutProps) => {
|
||||
const banners = useBanners();
|
||||
|
||||
const pathname = usePathname();
|
||||
const isFullPageWithoutSidebar = pathname.startsWith("/apps/routing-forms/reporting/");
|
||||
const { data: user } = trpc.viewer.me.useQuery();
|
||||
const { boot } = useIntercom();
|
||||
const pageTitle = typeof props.heading === "string" && !props.title ? props.heading : props.title;
|
||||
@@ -253,7 +254,7 @@ const Layout = (props: LayoutProps) => {
|
||||
<TimezoneChangeDialog />
|
||||
|
||||
<div className="flex min-h-screen flex-col">
|
||||
{banners && !props.isPlatformUser && (
|
||||
{banners && !props.isPlatformUser && !isFullPageWithoutSidebar && (
|
||||
<div className="sticky top-0 z-10 w-full divide-y divide-black">
|
||||
{Object.keys(banners).map((key) => {
|
||||
if (key === "teamUpgradeBanner") {
|
||||
|
||||
Reference in new issue
Block a user