Ready to get started?

Join Adocasts Plus for $8/mo, or sign into an existing Adocasts Plus account, to get access to all of our lessons.

robot mascot smiling

The Form Dialog Component & Adding Organizations

@tomgobich
Published by
@tomgobich
In This Lesson

We'll add a new form dialog component that simplifies the create and update forms we'll use throughout our application. We'll then use this component to add a create organization dialog within our organization selector.

Chapters

00:00 - Adding Our Add Organization Dropdown Item
02:18 - Creating Our Form Dialog Component
06:50 - Using Our Form Dialog Component to Create An Organization
07:55 - Testing Our Add Organization Flow
08:10 - Updating The Active Organization When Creating An Organization

Join the Discussion 2 comments

Create a free account to join in on the discussion
  1. @jals

    You can also do it like this in FormDialog.vue

    defineProps<{
      editing?: boolean
      processing?: boolean
      resource?: string
    }>()
    
    const open = defineModel<boolean>('open')
    Copied!
    1
    1. Responding to jals
      @tomgobich

      Wow - thanks a ton for sharing this, Jeffrey! I completely missed Vue adding in the defineModel macro, that's a huge improvement!!

      1