CSS Element State Button Fix

This commit is contained in:
Conor_Mack 2020-06-01 18:04:45 +01:00
parent d648844c3d
commit c31b5a6f19
1 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@
onChange(val)
}
const checkSelected = val =>
isMultiSelect ? value.includes(val) : value === val
@ -37,7 +38,7 @@
{#each buttonProps as props}
<div class="button-container">
<FlatButton
selected={checkSelected(props.value)}
selected={isMultiSelect ? value.includes(props.value) : value === props.value}
onClick={onButtonClicked}
{...props} />
</div>