Need a default view mode selection if null

This commit is contained in:
Lim Chee Aun 2023-03-16 00:33:58 +08:00
parent aaf12e2c47
commit e0688afdfc

View file

@ -235,7 +235,11 @@ function ShortcutsSettings() {
type="radio" type="radio"
name="shortcuts-view-mode" name="shortcuts-view-mode"
value={value} value={value}
checked={snapStates.settings.shortcutsViewMode === value} checked={
snapStates.settings.shortcutsViewMode === value ||
(value === 'float-button' &&
!snapStates.settings.shortcutsViewMode)
}
onChange={(e) => { onChange={(e) => {
states.settings.shortcutsViewMode = e.target.value; states.settings.shortcutsViewMode = e.target.value;
}} }}