ISSUE-038 - Switched SlotSelector from using strings for onChange() to simply returning the selected index.
As well as just being a little bit better this was necessary to support specifically typed values. We were always going to be selecting between strictly strings. This should allow us to be more flexible. Also, to avoid a minor bug with switching the Overlay tool with it being invisible SlotSelector now supports being disabled.
This commit is contained in:
1 parent
8a44d7af65
commit
536d81fb61
4 files changed
+21
-9
No files matched your search
@@ -46,9 +46,10 @@ export function OverlayControl() {
|
||||
/>
|
||||
<SlotSelector
|
||||
items={overlayIds}
|
||||
onChange={(value) => dispatch(setCurrentOverlayId(value))}
|
||||
onChange={(index) => dispatch(setCurrentOverlayId(overlayIds[index]))}
|
||||
removePrefix
|
||||
formatter={(value) => value.replace(/(\.png)|(\.jpg)$/, "")}
|
||||
disabled={!visible}
|
||||
/>
|
||||
</Inline>
|
||||
<ProgressSlider
|
||||
|
||||
Reference in new issue
Block a user