Download the PHP package fadlee/filament-indonesia-region-field without Composer
On this page you can find all versions of the php package fadlee/filament-indonesia-region-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fadlee/filament-indonesia-region-field
More information about fadlee/filament-indonesia-region-field
Files in fadlee/filament-indonesia-region-field
Package filament-indonesia-region-field
Short Description Indonesia Region Field for Filament
License MIT
Informations about the package filament-indonesia-region-field
Filament Indonesia Region Field
A custom form field component for Filament PHP that adds Indonesia region selection capabilities to your forms. This package provides a single select input field that can handle 4 levels of Indonesia administrative regions (Province, Regency/City, District, and Village).
Features
- Seamless integration with Filament forms
- Single input field for selecting Indonesia regions
- Support for 4 administrative levels:
- Province (Provinsi)
- Regency/City (Kabupaten/Kota)
- District (Kecamatan)
- Village (Desa/Kelurahan)
- Client-side fuzzy search for better performance
- No additional server requests for searching
- Extends Filament's native select component
Requirements
- PHP 8.1 or higher
- Laravel 10.0 or higher
- Filament 3.x
Installation
You can install the package via composer:
Usage
-
Import the IndonesiaRegionSelect component and RegionLevel enum in your Filament resource or form:
-
Add the field to your form:
- Using with specific level:
Available levels:
RegionLevel::LEVEL_1_PROVINCE
RegionLevel::LEVEL_2_CITY
RegionLevel::LEVEL_3_DISTRICT
RegionLevel::LEVEL_4_VILLAGE
- Using in Filament action modals:
How it Works
The package extends Filament's native select component to provide a seamless Indonesia region selection experience. Key features include:
-
Client-side Search: All searching is performed on the client side using fuzzy search, eliminating the need for additional server requests and providing instant feedback.
-
Data Loading: Region data is loaded once and cached on the client side, making subsequent searches and filtering operations extremely fast.
- User Experience: The component provides immediate response to user input since all operations are performed locally in the browser.
Technical Implementation
The Indonesia region selector is built on top of Filament's select component with these enhancements:
-
Data Structure: Uses a comprehensive database of Indonesia administrative regions up to village level.
-
Search Implementation: Implements client-side fuzzy search for better performance and user experience.
- Value Management: Handles the storage and retrieval of region codes while displaying human-readable region names in the interface.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This package is open-sourced software licensed under the MIT license.
All versions of filament-indonesia-region-field with dependencies
filament/filament Version ^3.0
filament/forms Version ^3.0
filament/tables Version ^3.0
spatie/laravel-package-tools Version ^1.14.0