Giter VIP home page Giter VIP logo

alpinejs-slug's Introduction

alpinejs-slug's People

Contributors

markmead avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

juliangarcess

alpinejs-slug's Issues

[BUG] Not Working with Livewire

Hi! I can't get the value of x-slug to pass to the livewire component.
If I enter a character in the input after x-slug is set, then it goes to the component.
I am using it with the jetstream inputs <x-jet-input> inside the modal <x-jet-dialog-modal>
What am I doing wrong?

<x-jet-dialog-modal wire:model='isOpen'>
    <x-slot name="title">
        {{ isset($this->category->id) ? __('Edit category') : __('Add new category') }}
    </x-slot>
    
    <x-slot name="content">
        <div x-data="{ name : '' }">
            <!-- Name -->
            <div class="col-span-6 sm:col-span-4 mt-4">
                <x-jet-label for="name" value="{{ __('Name') }}" />
                <x-jet-input id="name" type="text" class="mt-1 block w-full" wire:model.defer="name" x-model="name" />
                <x-jet-input-error for="name" class="mt-2" />
            </div>
            <!-- Slug -->
            <div class="col-span-6 sm:col-span-4 mt-4">
                <x-jet-label for="slug" value="{{ __('Slug') }}" />
                <x-jet-input id="slug" type="text" class="mt-1 block w-full" wire:model.defer="slug" x-slug="name"/>
                <x-jet-input-error for="slug" class="mt-2" />
            </div>
        </div>
    </x-slot>
    
    <x-slot name="footer">
        <x-jet-secondary-button wire:click="closeModal()" wire:loading.attr="disabled">
            {{ __('cancel') }}
        </x-jet-secondary-button>
        
        @isset($this->category->id)
            <x-jet-button class="ml-2" wire:click="update()" wire:loading.attr="disabled">
                {{ __('edit') }}
            </x-jet-button>
        @else
            <x-jet-button class="ml-2" wire:click="store()" wire:loading.attr="disabled">
                {{ __('add') }}
            </x-jet-button>
        @endisset
    </x-slot>
</x-jet-dialog-modal>

[BUG] Value is changing on page load

How can I make it only triggers when title changes.
The problem is I can't manually change the slug if I want to. It convert on page loads every time

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.