Some fixes

This commit is contained in:
Richard O'flynn 2020-11-30 22:14:59 +00:00
commit a249b6183b
7 changed files with 10 additions and 10 deletions

View file

@ -2729,7 +2729,7 @@ None.
| Prop name | Kind | Reactive | Type | Default value | Description |
| :------------ | :--------------- | :------- | :------------------- | ------------------ | --------------------------------------- |
| selectedValue | <code>let</code> | Yes | <code>string</code> | -- | Specify the selected tile value |
| selectedValue | <code>let</code> | Yes | <code>any</code> | -- | Specify the selected tile value |
| disabled | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the tile group |
| legend | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the legend text |
@ -2961,7 +2961,7 @@ None.
| Prop name | Kind | Reactive | Type | Default value | Description |
| :------------- | :--------------- | :------- | :------------------- | ------------------ | ----------------------------------------- |
| selectedValues | <code>let</code> | Yes | <code>string</code> | <code>[]</code> | Specify the selected tile's |
| selectedValues | <code>let</code> | Yes | <code>any[]</code> | <code>[]</code> | Specify the selected tile's |
| disabled | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the tile group |
| light | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
| legend | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the legend text |

View file

@ -8772,7 +8772,7 @@
"name": "selectedValue",
"kind": "let",
"description": "Specify the selected tile value",
"type": "string",
"type": "any",
"isFunction": false,
"constant": false,
"reactive": true
@ -8811,7 +8811,7 @@
"name": "selectedValues",
"kind": "let",
"description": "Specify the selected tile's",
"type": "string",
"type": "any[]",
"value": "[]",
"isFunction": false,
"constant": false,

View file

@ -1,7 +1,7 @@
<script>
/**
* Specify the selected tile value
* @type {string}
* @type {any}
*/
export let selectedValue = undefined;

View file

@ -59,7 +59,7 @@
class:bx--tile--light="{light}"
{...$$restProps}
on:click
on:click|preventDefault="{() => update(value, !selected)}"
on:click|preventDefault="{() => update({ value, selected: !selected })}"
on:mouseover
on:mouseenter
on:mouseleave
@ -67,7 +67,7 @@
on:keydown="{(e) => {
if (e.key === ' ' || e.key === 'Enter') {
e.preventDefault();
update(value, !selected);
update({ value, selected: !selected });
}
}}"
>

View file

@ -1,7 +1,7 @@
<script>
/**
* Specify the selected tile's
* @type {string[]}
* @type {any[]}
*/
export let selectedValues = [];

View file

@ -4,7 +4,7 @@ export interface RadioTileGroupProps extends svelte.JSX.HTMLAttributes<HTMLEleme
/**
* Specify the selected tile value
*/
selectedValue?: string;
selectedValue?: any;
/**
* Set to `true` to disable the tile group

View file

@ -5,7 +5,7 @@ export interface SelectableTileGroupProps extends svelte.JSX.HTMLAttributes<HTML
* Specify the selected tile's
* @default []
*/
selectedValues?: string;
selectedValues?: any[];
/**
* Set to `true` to disable the tile group