Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 1434f8b

Browse files
committed
fix(plugins/plugin-client-common): components choice does not reset to default on theme switch
Fixes #4423
1 parent 3dff5a5 commit 1434f8b

File tree

1 file changed

+4
-3
lines changed
  • plugins/plugin-client-common/src/components/Client

1 file changed

+4
-3
lines changed

plugins/plugin-client-common/src/components/Client/Kui.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ export class Kui extends React.PureComponent<Props, State> {
102102
// note the priority order, from highest to lowest:
103103
// 1) any properties defined by the theme (since we just switched themes)
104104
// 2) any properties defined by the container of this <Kui/>
105-
// 3) any prior state
106-
// 4) default choices
107-
const stateAfterThemeChange = Object.assign({}, defaultThemeProperties, curState, this.props, themeModel)
105+
// 3) default choices
106+
// 4) any prior state
107+
// re: ordering of 3 and 4, see https://github.com/IBM/kui/issues/4423
108+
const stateAfterThemeChange = Object.assign({}, curState, defaultThemeProperties, this.props, themeModel)
108109
debug('state after theme change', stateAfterThemeChange)
109110
return stateAfterThemeChange
110111
})

0 commit comments

Comments
 (0)