Closed johannesss closed 2 years ago
You need to put the disabled
property as a direct descendant of the lime
property, like this:
document.querySelector('limel-form').schema = {
title: 'Registration form',
description: 'Please enter your personal information',
type: 'object',
required: [],
properties: {
sidekicks: {
type: 'array',
title: 'Sidekicks',
lime: {
disabled: true
},
description: 'Please select your sidekicks',
uniqueItems: true,
minItems: 2,
items: {
title: 'Friends',
type: 'string',
anyOf: [
{
type: 'string',
const: 'super',
title: 'Superman',
},
{
type: 'string',
const: 'widow',
title: 'Black Widow',
},
{
type: 'string',
const: 'america',
title: 'Captain America',
},
{
type: 'string',
const: 'squirrel',
title: 'Squirrel Girl',
},
{
type: 'string',
const: 'devil',
title: 'Daredevil',
},
{
type: 'string',
const: 'marvel',
title: 'Captain Marvel',
},
{
type: 'string',
const: 'fantastic',
title: 'Mr. Fantastic',
},
],
},
},
},
}
Although, it certainly would be preferable if it was possible to set the value in either place. I'll have a look, if it's easy, we'll fix it, if not, I say we perhaps add something about it to the docs instead.
(I just had to check before I posted: I tried it out in the "Dynamic schema" example for limel-form in the docs, and it seems to work to put the value in either place when using limel-input, so I'm not sure why it wouldn't also work for limel-select…)
Ah, yes that works. Sounds good! Yeah I really figured they'd be consistent for every component.
:tada: This issue has been resolved in version 34.1.0-next.16 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 34.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Current behavior
Unable to disable select inputs when used in limel-form
Steps to reproduce the behavior:
Expected behavior
The select input should be disabled
Environment
Codepen demonstrating the issue: https://codepen.io/johanneseriksson/pen/WNZvWoB