InforSelectables

Improved versions of classic select inputs.


InforSelectables@1.2.1.js
selectables.js

- 2026-09-04 12:04:16: listener bug fixed

InforSelectables@1.2.1-min.js
selectables.js

- 2026-09-04 12:04:16: listener bug fixed

InforSelectables@1.2.0.css
selectables.css

- 2026-09-01 11:22:39: added lazy loading option to infor-select-search

InforSelectables@1.2.0-min.css
selectables.css

- 2026-09-01 11:22:39: added lazy loading option to infor-select-search

InforSelectables@1.2.0.js
selectables.js

- 2026-09-01 11:22:39: added lazy loading option to infor-select-search

InforSelectables@1.2.0-min.js
selectables.js

- 2026-09-01 11:22:39: added lazy loading option to infor-select-search

InforSelectables@1.1.29.css
selectables.css

- 2026-06-22 11:55:09: livewire 3.0 update

InforSelectables@1.1.29-min.css
selectables.css

- 2026-06-22 11:55:09: livewire 3.0 update

InforSelectables@1.1.29.js
selectables.js

- 2026-06-22 11:55:09: livewire 3.0 update

InforSelectables@1.1.29-min.js
selectables.js

- 2026-06-22 11:55:09: livewire 3.0 update

InforSelectables@1.1.27.css
selectables.css

- 2025-02-17 13:25:14: onchenge optional

InforSelectables@1.1.27-min.css
selectables.css

- 2025-02-17 13:25:14: onchenge optional

InforSelectables@1.1.27.js
selectables.js

- 2025-02-17 13:25:14: onchenge optional

InforSelectables@1.1.27-min.js
selectables.js

- 2025-02-17 13:25:14: onchenge optional

InforSelectables@1.1.19.css
selectables.css

- 2024-09-11 06:49:49: + Multiple -> Locked

InforSelectables@1.1.19-min.css
selectables.css

- 2024-09-11 06:49:49: + Multiple -> Locked

InforSelectables@1.1.19.js
selectables.js

- 2024-09-11 06:49:49: + Multiple -> Locked

InforSelectables@1.1.19-min.js
selectables.js

- 2024-09-11 06:49:49: + Multiple -> Locked

InforSelectables@1.1.16.css
selectables.css

- 2024-08-02 07:12:07: + data-disabled

InforSelectables@1.1.16-min.css
selectables.css

- 2024-08-02 07:12:07: + data-disabled

InforSelectables@1.1.16.js
selectables.js

- 2024-08-02 07:12:07: + data-disabled

InforSelectables@1.1.16-min.js
selectables.js

- 2024-08-02 07:12:07: + data-disabled

InforSelectables@1.1.15.css
selectables.css

- 2024-07-31 06:27:43: Select Edit prefill value fix

InforSelectables@1.1.15-min.css
selectables.css

- 2024-07-31 06:27:43: Select Edit prefill value fix

InforSelectables@1.1.15.js
selectables.js

- 2024-07-31 06:27:43: Select Edit prefill value fix

InforSelectables@1.1.15-min.js
selectables.js

- 2024-07-31 06:27:43: Select Edit prefill value fix

InforSelectables@1.1.14.css
selectables.css

- 2024-05-22 12:01:37: Select Edit onchange fix

InforSelectables@1.1.14-min.css
selectables.css

- 2024-05-22 12:01:37: Select Edit onchange fix

InforSelectables@1.1.14.js
selectables.js

- 2024-05-22 12:01:37: Select Edit onchange fix

InforSelectables@1.1.14-min.js
selectables.js

- 2024-05-22 12:01:37: Select Edit onchange fix

InforSelectables@1.1.12.css
selectables.css

- 2024-05-22 10:26:22: + Edit + HTML

InforSelectables@1.1.12-min.css
selectables.css

- 2024-05-22 10:26:22: + Edit + HTML

InforSelectables@1.1.12.js
selectables.js

- 2024-05-22 10:26:22: + Edit + HTML

InforSelectables@1.1.12-min.js
selectables.js

- 2024-05-22 10:26:22: + Edit + HTML

InforSelectables@1.1.11.css
selectables.css

- 2024-05-22 10:25:29: + Edit

InforSelectables@1.1.11-min.css
selectables.css

- 2024-05-22 10:25:29: + Edit

InforSelectables@1.1.11.js
selectables.js

- 2024-05-22 10:25:29: + Edit

InforSelectables@1.1.11-min.js
selectables.js

- 2024-05-22 10:25:29: + Edit

InforSelectables@1.1.10.css
selectables.css

- 2024-05-13 11:32:09: +.enable(), .disable(), .isActive()

InforSelectables@1.1.10-min.css
selectables.css

- 2024-05-13 11:32:09: +.enable(), .disable(), .isActive()

InforSelectables@1.1.10.js
selectables.js

- 2024-05-13 11:32:09: +.enable(), .disable(), .isActive()

InforSelectables@1.1.10-min.js
selectables.js

- 2024-05-13 11:32:09: +.enable(), .disable(), .isActive()

InforSelectables@1.1.5.css
selectables.css

- 2024-03-13 09:00:12: Table responsibility

InforSelectables@1.1.5-min.css
selectables.css

- 2024-03-13 09:00:12: Table responsibility

InforSelectables@1.1.5.js
selectables.js

- 2024-03-13 09:00:12: Table responsibility

InforSelectables@1.1.5-min.js
selectables.js

- 2024-03-13 09:00:12: Table responsibility

InforSelectables@1.1.3.css
selectables.css

- 2024-01-26 08:51:59: +onchangeOption

InforSelectables@1.1.3-min.css
selectables.css

- 2024-01-26 08:51:59: +onchangeOption

InforSelectables@1.1.3.js
selectables.js

- 2024-01-26 08:51:59: +onchangeOption

InforSelectables@1.1.3-min.js
selectables.js

- 2024-01-26 08:51:59: +onchangeOption

InforSelectables@1.1.0.css
selectables.css

- 2024-01-04 08:49:32: +livewire-params

InforSelectables@1.1.0-min.css
selectables.css

- 2024-01-04 08:49:32: +livewire-params

InforSelectables@1.1.0.js
selectables.js

- 2024-01-04 08:49:32: +livewire-params

InforSelectables@1.1.0-min.js
selectables.js

- 2024-01-04 08:49:32: +livewire-params

InforSelectables@1.0.11-min.css
selectables.css

- 2023-12-01 12:22:05: Init data-clear on load

InforSelectables@1.0.11.js
selectables.js

- 2023-12-01 12:22:05: Init data-clear on load

InforSelectables@1.0.11-min.js
selectables.js

- 2023-12-01 12:22:05: Init data-clear on load

InforSelectables@1.0.11.css
selectables.css

- 2023-12-01 12:22:04: Init data-clear on load

InforSelectables@1.0.10.css
selectables.css

- 2023-11-08 08:07:03: CSS

InforSelectables@1.0.10-min.css
selectables.css

- 2023-11-08 08:07:03: CSS

InforSelectables@1.0.10.js
selectables.js

- 2023-11-08 08:07:03: CSS

InforSelectables@1.0.10-min.js
selectables.js

- 2023-11-08 08:07:03: CSS

InforSelectables@1.0.9.css
selectables.css

- 2023-10-23 14:21:43: SelectMultiple -> +livewire

InforSelectables@1.0.9-min.css
selectables.css

- 2023-10-23 14:21:43: SelectMultiple -> +livewire

InforSelectables@1.0.9.js
selectables.js

- 2023-10-23 14:21:43: SelectMultiple -> +livewire

InforSelectables@1.0.9-min.js
selectables.js

- 2023-10-23 14:21:43: SelectMultiple -> +livewire

InforSelectables@1.0.8.css
selectables.css

- 2023-10-23 12:07:05: Livewire.emit data attribute

InforSelectables@1.0.8-min.css
selectables.css

- 2023-10-23 12:07:05: Livewire.emit data attribute

InforSelectables@1.0.8.js
selectables.js

- 2023-10-23 12:07:05: Livewire.emit data attribute

InforSelectables@1.0.8-min.js
selectables.js

- 2023-10-23 12:07:05: Livewire.emit data attribute

InforSelectables@1.0.7.css
selectables.css

- 2023-10-23 08:39:17: Removed console.log

InforSelectables@1.0.7-min.css
selectables.css

- 2023-10-23 08:39:17: Removed console.log

InforSelectables@1.0.7.js
selectables.js

- 2023-10-23 08:39:17: Removed console.log

InforSelectables@1.0.7-min.js
selectables.js

- 2023-10-23 08:39:17: Removed console.log

InforSelectables@1.0.1.css
selectables.css

- 2023-10-11 13:09:08: -Search -> +Clear button -Search -> Code optimalization

InforSelectables@1.0.1-min.css
selectables.css

- 2023-10-11 13:09:08: -Search -> +Clear button -Search -> Code optimalization

InforSelectables@1.0.1.js
selectables.js

- 2023-10-11 13:09:08: -Search -> +Clear button -Search -> Code optimalization

InforSelectables@1.0.1-min.js
selectables.js

- 2023-10-11 13:09:08: -Search -> +Clear button -Search -> Code optimalization


Dependencies:
JS: <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script> CSS: <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">

README

HTML

Select Search


<infor-select-search id="search" name="search" class="form-control" placeholder="Selecteer status">
  <infor-select-option data-name="Actielijst" data-value="actielijst" data-selected>Actielijst</infor-select-option>
  <infor-select-option data-name="Lopend" data-value="lopend">Lopend</infor-select-option>
</infor-select-search>

Select Multiple


<infor-select-multiple id="multiple" name="multiple" class="form-control" placeholder="Selecteer status">
  <infor-select-option data-name="Actielijst" data-value="actielijst">Actielijst</infor-select-option>
  <infor-select-option data-name="Lopend" data-value="lopend">Lopend</infor-select-option>
</infor-select-multiple>

Select Edit


<infor-select-edit id="edit" name="edit" class="form-control rounded-pill" placeholder="Selecteer status">
  <infor-select-option data-value="actielijst">Actielijst</infor-select-option>
  <infor-select-option data-value="lopend">Lopend</infor-select-option>
</infor-select-edit>

Select Search Lazy Loading

Adding data-api turns the select into a lazy-loading select. Options are fetched in chunks from the API instead of being declared as static children.

Lazy

<infor-select-search id="offertes" name="offerte_id" class="form-control" placeholder="Selecteer offerte"
  data-api="api/offertes"
  data-search-api="api/offertes/search-ids"
  data-content="offertenummer"
  data-sub-content="naam"
  data-value="id"
  data-sort-by="offertenummer"
  data-sort-type="desc">
</infor-select-search>
Lazy + static

Static <infor-select-option> children are kept and shown above the fetched options:


<infor-select-search id="offertes-mixed" name="offerte_id" class="form-control" placeholder="Selecteer offerte"
  data-api="api/offertes"
  data-search-api="api/offertes/search-ids"
  data-content="offertenummer"
  data-sub-content="naam"
  data-value="id"
  data-chunk-size="20">
  <infor-select-option data-name="Handmatig" data-value="0">Handmatig</infor-select-option>
</infor-select-search>

Behavior:

  • On init the first chunk is fetched and shown when the select is opened.
  • Scrolling the options to the bottom fetches the next chunk, until a chunk returns fewer records than data-chunk-size.
  • Typing in the search box (debounced 200ms) queries data-search-api, which returns an array of ids. Those ids are then posted to data-api, and the returned records are appended to the options (deduped by data-value).

Endpoint contracts:

Endpoint Request params Response
data-api sort_by, sort_type, offset, limit Array of full records
data-api <data-search-key>[] (ids) Array of full records for those ids
data-search-api search Array of ids

All requests also include data-params and the csrf token. If data-search-api is omitted, typing in the search box does nothing.

Options

Attribute Description Select Multiple Edit Default
id Instance identifier X X X Random string
name Input name attribute X X X
placeholder Input placeholder attribute X X X
class Input styling classes X X X
data-value (prefill) Prefill a value X
data-disabled Disables the input X X X
data-livewire Triggers Livewire.emit / Livewire.dispatch on change with value or values as param X X X
data-livewire-params Optional additional livewire params, syntax: data-livewire-params=":id=5 :name=TEST" X X X
option class CSS Classes X X x
option data-name Name that will be display on select X X
option data-value Value that will posted X X X
option data-selected Pre-selects an option X X
option data-params Appends data elements to the option html element, syntax: data-params=":proces=1" X X X
option data-locked Locks the option in the current state X
data-api Enables lazy loading, browse endpoint for chunked fetches X
data-search-api Search endpoint, returns ids that are then fetched via data-api X
data-search-key Request param name for the ids posted to data-api X ids
data-value (lazy) Record column used as option value X id
data-content Renders option text, see search data-content examples X
data-sub-content Optional secondary line, see search data-content examples X
data-chunk-size Records per browse request X 20
data-sort-by Sort column for browse requests X
data-sort-type Sort direction, asc or desc X asc
data-params Extra POST params merged into every request, must be a var X
data-errors Optional callback for handling errors X

Additional action buttons

Place this div inside <infor-select-search>, the content will be appended to the action button


<infor-select-action>
  <div onclick="alert('test')">Action Example</div>
</infor-select-action>

Additional hidden input attributes

Place this div inside <infor-select-search>, all attributes will be appended to the hidden input


<infor-select-search-hidden-attr wire:model="role"></infor-select-search-hidden-attr>

Instance

Select Search

Use _inforSelectSearch.get(id) to get the instance

Variable Parameters Description
onchange() value: string/int Triggers on change with selected value as parameter, can be changed like this instance.onchange = value => { console.log(value) }
getValue() Returns currently selected value: {name: "Displayed name", value: "Hidden value"}
setValue() value: string/int Sets values based on the provided parameter
addValue() options: object (name*, value*, html, params) Appends a new value to the select
enable() Enables the input
disable() Disables the input
clear() Clears the input
Lazy loading state

When lazy loading is enabled the instance keeps the fetched records and pagination state, usable with _inforSelectSearch.get(id):

Variable Description
records Array of all fetched records, deduped by data-value
offset Number of records already fetched
chunk_size Records per browse request
chunk_loading Whether a browse chunk is currently being fetched
chunk_finished Whether the browse list is exhausted
search_loading Whether a search request is currently being processed

Select Multiple

Use _inforSelectMultiple.get(id) to get the instance

Variable Parameters Description
onchange() values: object[] Triggers on change with selected values as parameter, can be changed like this instance.onchange = values => { console.log(values) }
onchangeOption() value: object Triggers on change with selected value as parameter, can be changed like this instance.onchangeOption = value => { console.log(value) }
getValues() Returns currently selected options in an array: [{name: "Actielijst", value: "actielijst"}]
setValues() values: array, deselect: boolean Sets values based on the provided array. Deselects not included options based on deselect parameter, deselects by default
addValue() options: object (name*, value*, html, params, locked, selected) Appends a new value to the select.
enable() Enables the input
disable() Disables the input
clear() Clears the input

Select Edit

Use _inforSelectMultiple.get(id) to get the instance

Variable Parameters Description
onchange() value: string/int Triggers on change with selected value as parameter, can be changed like this instance.onchange = value => { console.log(value) }
getValue() Returns currently selected value: {name: "Displayed name", value: "Hidden value"}
setValue() value: string/int Sets values based on the provided parameter
addValue() options: object (value*, html, params) Appends a new value to the select.
enable() Enables the input
disable() Disables the input
clear() Clears the input