Files
calendar/docs
devin-ai-integration[bot]GitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>somay@cal.com <somay@cal.com>Somay Chauhan
eb4eebe6f9 feat: expose form validation methods from EventTypePlatformWrapper (#22655)
* feat: expose form validation methods from EventTypePlatformWrapper

- Add validateForm and handleFormSubmit methods to onFormStateChange prop
- Update useEventTypeForm hook to return validateForm method
- Add proper TypeScript types for form validation result
- Enable external form validation and submission capabilities

Co-Authored-By: somay@cal.com <somay@cal.com>

* fix: correct forwardRef syntax to resolve parsing errors

- Fix forwardRef parameter destructuring syntax
- Use proper props parameter pattern for forwardRef components
- Ensure prettier can parse the file correctly

Co-Authored-By: somay@cal.com <somay@cal.com>

* feat: add form validation and submission handlers to event types platform wrapper

* refactor: move form validation and submit handlers from hook to wrapper component

* fix: add ref to the save button for proper form validation

* feat: extend ref-based validation API to AvailabilitySettingsPlatformWrapper

- Add AvailabilityFormValidationResult and AvailabilitySettingsPlatformWrapperRef types
- Implement forwardRef pattern in AvailabilitySettings component with save button ref
- Add validateForm and handleFormSubmit methods using useImperativeHandle
- Update AvailabilitySettingsPlatformWrapper to support ref forwarding
- Add comprehensive documentation for ref-based validation API in both event-type.mdx and availability-settings.mdx
- Follow same patterns established in EventTypePlatformWrapper for consistency

Co-Authored-By: somay@cal.com <somay@cal.com>

* refactor: rename AvailabilitySettingsPlatformWrapperRef to AvailabilitySettingsFormRef

* feat: add ref-based validation pattern to availability example page

- Mirror the ref-based validation implementation from event-types.tsx
- Add useRef, handleValidate, and handleSubmit functions
- Demonstrate validateForm() and handleFormSubmit() methods
- Add validation and submit buttons to showcase the new API
- Use AvailabilitySettingsFormRef type for proper typing

Co-Authored-By: somay@cal.com <somay@cal.com>

* refactor: remove unused state variables

* docs: clarify form validation behavior for availability and event type atoms

* chore: remove console.logs

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: somay@cal.com <somay@cal.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
2025-07-23 15:28:09 +05:30
..
2024-10-03 15:26:01 +04:00
2024-10-03 15:26:01 +04:00
2024-10-03 15:26:01 +04:00
2025-02-07 06:45:34 +00:00
2024-10-03 15:26:01 +04:00

Mintlify Starter Kit

Click on Use this template to copy the Mintlify starter kit. The starter kit contains examples including

  • Guide pages
  • Navigation
  • Customizations
  • API Reference pages
  • Use of popular components

Development

Install the Mintlify CLI to preview the documentation changes locally. To install, use the following command

npm i -g mintlify

Run the following command at the root of your documentation (where mint.json is)

mintlify dev

Publishing Changes

Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.

Troubleshooting

  • Mintlify dev isn't running - Run mintlify install it'll re-install dependencies.
  • Page loads as a 404 - Make sure you are running in a folder with mint.json