bito-code-review[bot] commented on PR #40905:
URL: https://github.com/apache/superset/pull/40905#issuecomment-4661689995
<!-- Bito Reply -->
The flagged issue is correct. When divider edits are made, the
`handleValuesChange` function in `FiltersConfigModal` does not trigger the
necessary state updates to mark the divider as modified, which prevents the
`canSave` flag from enabling the Save button.
To resolve this, you should ensure that divider-specific changes are
tracked. You can update `handleValuesChange` to inspect the changed values and
call `handleModifyItem` when the changed ID corresponds to a divider.
Alternatively, passing a modification callback into `DividerConfigForm` would
allow it to explicitly add the divider ID to `changes.modified`.
Would you like me to fetch all other comments on this PR to validate them
and implement minimal fixes for those as well?
**superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx**
```
const handleValuesChange = (changedValues: any, allValues: any) => {
// ... existing logic
if (changedValues.filters) {
const changedId = Object.keys(changedValues.filters)[0];
if (isDivider(changedId)) {
handleModifyItem(changedId);
}
}
// ...
};
```
--
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]