-
-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Select fields not selectized when dynamically added #692
Comments
Using Grav 1.1RC (and Admin 1.1) or 1.0.10? |
Sorry, really should've specified that! Using Grav v1.1.0-rc.3 - Admin v1.1.0-rc.4 |
I tested with a nested list and a selectize field but it still renders 'selectized' when i add new items. Also, what OS and Browser were you testing on? |
Both Firefox 47 and Chrome 51 exhibit the same problem for me. Sorry, just to clarify: I'm not using the When I click to add new select elements, they look almost identical to the selectized ones when not expanded, but the selectized ones have built-in filtering and a nicely styled dropdown. Sure, here's my YAML: title: Groups
'@extends': default
form:
fields:
tabs:
type: tabs
fields:
group:
type: tab
title: Groups
fields:
header.groups:
name: groups
type: list
btnLabel: "Add group"
style: vertical
label: Groups
fields:
.wrappers:
name: wrappers
type: list
btnLabel: "Add wrapper"
style: vertical
label: Wrappers
fields:
.height:
type: select
size: long
label: Height
options:
full: Full
half: Half
.images:
name: images
type: list
btnLabel: "Add image"
style: vertical
label: Images
fields:
.image:
type: pagemediaselect
label: Image
.width:
type: select
size: long
label: Width
options:
full: Full
half: Half |
I think that's the problem. Using just ie, .width:
type: select
classes: fancy
size: long
label: Width
options:
full: Full
half: Half |
@w00fz hmm I tried adding that class, but it didn't make a difference. All the fields that were there on page load were still transformed with selectize, and the ones that I added dynamically were not. So it looks like an inconcistency between those two. |
I could reproduce the issue with your YAML above, but after adding the Updated YAMLtitle: Selectize
'@extends': default
title: Groups
'@extends': default
form:
fields:
tabs:
type: tabs
fields:
group:
type: tab
title: Groups
fields:
header.groups:
name: groups
type: list
btnLabel: "Add group"
style: vertical
label: Groups
fields:
.wrappers:
name: wrappers
type: list
btnLabel: "Add wrapper"
style: vertical
label: Wrappers
fields:
.height:
type: select
classes: fancy
size: long
label: Height
options:
full: Full
half: Half
.images:
name: images
type: list
btnLabel: "Add image"
style: vertical
label: Images
fields:
.image:
type: pagemediaselect
classes: fancy
label: Image
.width:
type: select
classes: fancy
size: long
label: Width
options:
full: Full
half: Half |
You're right! Applying the "fancy" class and clearing the cache did the trick, for both But it's still an incosistency that the elements that are there on page load get the "fancy" treatment without the "fancy" class, no? |
You are right, this was an inconsistency. I fixed it now, they will get the same treatment. |
It looks like there has been a regression here. I'm encountering this issue again with Grav v1.1.5 - Admin v1.2.2 |
Never mind my last comment, saw that this was reported again in #773 and that issue has been fixed 👍 |
I have a blueprint with a couple of nested lists that contain both
select
andpagemediaselect
type fields. When I edit a page in the admin panel and add new entries to these lists, the<select>
elements (for both types of fields) in the new entry aren't "selectized" - ie. they don't get the nice text filtering and styling etc.The text was updated successfully, but these errors were encountered: