yousoph commented on code in PR #42404:
URL: https://github.com/apache/superset/pull/42404#discussion_r3833310074
##########
superset-frontend/src/features/themes/ThemeModal.tsx:
##########
@@ -325,6 +373,15 @@ const ThemeModal: FunctionComponent<ThemeModalProps> = ({
[currentTheme],
);
+ const onEditorsChange = useCallback((values: SubjectPickerValue[]) => {
+ setCurrentTheme(prev => ({
+ ...prev,
+ theme_name: prev?.theme_name || '',
+ json_data: prev?.json_data || '',
+ editors: values || [],
Review Comment:
Good catch — fixed in 330290a2. `hasUnsavedChanges` now also compares the
editor selection (sorted subject IDs), so adding/removing/replacing editors
marks the modal dirty and triggers the discard confirmation (and the
`useBeforeUnload` guard) instead of silently dropping the change.
`initialTheme` already captures editors, so the baseline comparison is correct.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]