Releases: sergiodlopes/flexdatalist
Releases · sergiodlopes/flexdatalist
v3.1.1
What's Changed
Code Quality
- Improved code structure and readability across the core Flexdatalist module
- Enhanced request handling logic for better clarity
Documentation
- Updated README with new badges and navigation enhancements
Dependencies
- Bumped vite from 6.4.1 to 6.4.2
Full changelog: 3.1.0...3.1.1
v3.1.0
What's New
Framework Adapters
Flexdatalist now ships official adapters for modern frameworks:
- flexdatalist-react — React 18/19 component
- flexdatalist-vue — Vue 3 component
- flexdatalist-svelte — Svelte 4/5 component
Each adapter wraps the core Flexdatalist engine and exposes a declarative, idiomatic API for its framework.
New API
- getText() — retrieve the user-facing display text from the input
Project Structure
- Migrated to a pnpm monorepo with workspace packages under
packages/ - Removed Bower support (deprecated)
Bug Fixes
- Fixed examples page not loading (#255)
Full changelog: 3.0.1...3.1.0
v3.0.1
Fixes & Improvements
Dark mode support
- Full dark mode via
prefers-color-scheme: dark(automatic) or manual toggle withdata-theme="dark"/.fdl-darkclass - All hardcoded colors replaced with CSS custom properties (
--fdl-bg,--fdl-border,--fdl-text,--fdl-text-muted,--fdl-group-bg, etc.)
Behaviour fixes
- Removed
redoSearchOnFocus— search no longer re-triggers automatically on every focus event, preventing unwanted dropdowns - Show-all results (when
minLength: 0) now fires on click only, not on every focus - Fixed
loadparameter being sent asundefinedin remote requests when not needed - Improved variable naming in
_extractOnefor clarity
CSS
- Removed
min-widthfrom results dropdown for better layout flexibility - Tag hover now uses
--fdl-accent-lightconsistently
v3.0.0 — Standalone ES6 Rewrite
What's new in v3
Flexdatalist v3 is a complete rewrite — jQuery is no longer required. The entire plugin is now a single standalone ES6 class with zero dependencies.
Highlights
- Zero dependencies — no jQuery, no other libraries needed
- Modern ES6 class with a clean, chainable public API
- Async-ready —
Flexdatalist.init()returns a Promise; useawaitfor initial value loading - Native
fetch()replaces$.ajaxfor remote data - CustomEvents on the original
<input>replace jQuery event triggers (e.detailcarries the payload) - CSS custom properties (
--fdl-accent,--fdl-tag-bg, etc.) for easy theming - Auto-discovery preserved —
<input class="flexdatalist">still initialises on page load - localStorage caching with automatic garbage collection
- Accessible — ARIA attributes on the alias input and results list
Migration from v2
- Replace
$('input').flexdatalist(options)withawait Flexdatalist.init('input', options) - jQuery event listeners (
.on('select:flexdatalist', ...)) becomefd.on('select:flexdatalist', handler)— event names are unchanged - CSS class names are backwards-compatible; swap
jquery.flexdatalist.cssforflexdatalist.css - The jQuery v2 codebase is preserved on the
v2branch
Files
| File | Description |
|---|---|
flexdatalist.js |
Main script (single class, no build step) |
flexdatalist.css |
Default stylesheet with CSS custom properties |
v2.3.0
- Added support for taking a string/value from nested objects for valueProperty, textProperty and visibleProperties (thks @sylvainblot)
- Allow to customize the parameter name 'contain' that goes to the server (@lucaslm)
- Added 'params' option to also be a callback function that allows the customization of the parameters (@lucaslm)
- Added event 'empty:flexdatalist.results' (@fuzzywalrus)
- Added event 'item:flexdatalist.results' to allow for personalization of the item result
- Prevent form submit when adding value from enter key
- Added isArray() polyfill
- Removed deprecated jQuery methods to trigger/listen to events
- Added 'requestHeaders' option (thks @ozgurg)
- Fixed value duplication bug (#118) for multiple mode
- Fix unescaped string in regex processing, on the highlight function (thks @antunesl)
- Fix when handling the value limit
- Fix for when array values are mixed with JSON object and simple strings
- Fix when toggling values
- Improved accessibility (WIP)
v2.2.4
v2.2.3
- added tabindex -1 on input to prevent usability issues @Fewald
- update label[for] with correct alias ID
- focus on init fix
- class 'autodiscover-disabled' does what it suggests
- added event remove:flexdatalist.results for when results are removed
- data is not defined when using requestContentType = 'json'
v2.2.2
- placeholder fix
- minor improvements
v2.2.1
- fixes and improvements calling 'destroy' method
- alias field attributes cleanup
- dynamic multiple input size
- value not being removed on multiple values setup
v2.2.0
- now real input won't be hidden, just off screen (hopefully this will prevent clearing input on browser back page)
- minor fix on toggle
- valueProperty now accepts array of properties to pick from object item as value
- visibleProperties accepts string with placeholders
- added garbage collector for cache to prevent filling all localStorage available storage space
- gc runs on init only
- don't hide input container when there's no values
- minor fix for init event
- accept number value (converting it to string)
- minor backspace value removal fix
- other minor fixes and improvements