Caleb Porzio 2 năm trước cách đây
mục cha
commit
387a72d9da
2 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 1 0
      packages/alpinejs/src/directives.js
  2. 2 2
      packages/ui/src/radio-group.js

+ 1 - 0
packages/alpinejs/src/directives.js

@@ -192,6 +192,7 @@ let directiveOrder = [
     // @todo: provide better directive ordering mechanisms so
     // that I don't have to manually add things like "tabs"
     // to the order list...
+    'radio-group',
     'tabs',
     'bind',
     'init',

+ 2 - 2
packages/ui/src/radio-group.js

@@ -1,13 +1,13 @@
 
 export default function (Alpine) {
-    Alpine.directive('radio-group', (el, directive) => {
+    Alpine.directive('radio', (el, directive) => {
         if      (!directive.value)                  handleRoot(el, Alpine)
         else if (directive.value === 'option')      handleOption(el, Alpine)
         else if (directive.value === 'label')       handleLabel(el, Alpine)
         else if (directive.value === 'description') handleDescription(el, Alpine)
     })
 
-    Alpine.magic('radioGroupOption', el => {
+    Alpine.magic('radioOption', el => {
         let $data = Alpine.$data(el)
 
         return {