?
avatar no-matter-0
no-matter-0
20 Mar 2020

Joomla uses chosen https://harvesthq.github.io/chosen/ to display select boxes in frontend or backend
HTML5 provides now the perfect datalist who does the same thing without the need for another JS library
It would be nice to natively integrate this datalist

the support is good https://caniuse.com/#feat=datalist

thanks to all

avatar no-matter-0 no-matter-0 - open - 20 Mar 2020
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Mar 2020
avatar SharkyKZ
SharkyKZ - comment - 20 Mar 2020

Datalist is not a suitable replacement for Chosen. It's fine for text fields (already implemented in J3).

In J4 Chosen is already replaced by Choicesjs for multi-select and single-select uses nothing (can use Choicesjs as well if you need its features).

avatar no-matter-0
no-matter-0 - comment - 20 Mar 2020

I am using J4 beta 1 and I cannot see any advantages on JS choice over datalist

avatar brianteeman
brianteeman - comment - 20 Mar 2020

J4 is not using chosen it is using choices

in some use cases datalist could be used but not in all the places that joomla uses selects

For reference the requirements are

  1. accessible
  2. select multiple
  3. create new option on the fly
avatar Bakual
Bakual - comment - 20 Mar 2020

Datalist provide possible options for text field.
It's no replacement for a select list as it doesn't restrict the input to the datalist options as a select field would.
Chosen and choices both work on select lists, not on regular text inputs. So it's something completely different, allthougt looking similar.

avatar C-Lodder
C-Lodder - comment - 20 Mar 2020

Datalist and Choices are 2 very different things. The former being extremely limited and rather buggy. They had good intentions implementing this element, but it's not very good at what it does.

avatar no-matter-0
no-matter-0 - comment - 20 Mar 2020

there is a possibility with js to do a multiple select on datalist (for now)
but it was only a suggestion
thanks to all

avatar brianteeman
brianteeman - comment - 20 Mar 2020

Closed for the reasons stated

avatar brianteeman brianteeman - change - 20 Mar 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-03-20 09:43:44
Closed_By brianteeman
avatar brianteeman brianteeman - close - 20 Mar 2020

Add a Comment

Login with GitHub to post a comment