dabernathy89 / vue-query-builder

A UI component for building complex queries with nested conditionals.
https://dabernathy89.github.io/vue-query-builder/
MIT License
644 stars 159 forks source link

Is Custom Template supports custom-components ? #63

Open naumanahmed19 opened 4 years ago

naumanahmed19 commented 4 years ago

I am working on a project which is using custom-component and it works fine without custom templates but I needed to modify the styling and layout for which I am using custom template bit all other types works accept custom-component.

https://codesandbox.io/s/vue-query-builder-demo-tailwind-forked-gvz1s

justindantzer commented 3 years ago

@naumanahmed19 If you haven't found the solution to this, I ran in to the same thing. I realized I was missing some field types from the custom Rule component. You need to add the output for the custom component. I added it right before the remove button similar to this:

  ...

  <div v-if="isCustomComponent">
    <component
      :is="rule.component"
      :value="query.value"
      @input="updateQuery"
    />
  </div>

  <!-- Remove rule button -->
  <button type="button"...