The DevXP engineering team hosts office hours every Thursday at 11 a.m. Pacific Time where we answer your questions live and help you get up and running with Flatfile. Join us!

This configuration only impacts Guests and not Admins. Learn more about user access.

Flatfile allows you to update your sidebar to hide/show certain elements via the endpoint.

Simply update metadata.sidebarConfig when calling spaces.update().


Building a guest sidebar

Learn how to create a sidebar configuration, and update a sidebar configuration from an event listener.

import api from "@flatfile/api";

export default function flatfileEventListener(listener) {
  listener.on(
    "upload:completed",
    async ({ context: { spaceId, environmentId } }) => {
      try {
        const updateSpace = await api.spaces.update(spaceId, {
          environmentId,
          metadata: {
            sidebarConfig: {
              showSidebar: false,
            },
          },
        });
        console.log(updateSpace.data.metadata?.sidebarConfig);
        // Additional code related to the space update process
      } catch (error) {
        console.error("Error:", error.stack);
        // Handle the error appropriately
      }
    }
  );
}
// See full code example (https://github.com/FlatFilers/flatfile-docs-kitchen-sink/blob/main/javascript/guest-sidebar/index.js)

See full code example in our flatfile-docs-kitchen-sink Github repo


Guest sidebar reference

metadata.sidebarConfig

Sidebar Config

showDataChecklist
boolean

The data checklist shows all of the data needed for uploading to the primary Workbook.

showSidebar
boolean

Determines if a guest can see the sidebar. If the sidebar is hidden and there are multiple Workbooks in your Space, please specify the desired Workbook ID as your defaultPage.

Example Project

Find the guest sidebar example in the Flatfile GitHub repository.