message: fix sparks force save
diff: @@ -25,7 +25,7 @@ export default function SparksEditor() {
  const currentSparks = tableState?.config.sparks ?? "";
  const [localSparks, setLocalSparks] = useState(currentSparks);
  const [open, setOpen] = useState(false);
  - const [isSparksValid, setIsSparksValid] = useState(false);
  + const [isSparksValid, setIsSparksValid] = useState(true);
  const [showForceSave, setShowForceSave] = useState(false);
  const handleClose = () => {
  @@ -87,6 +87,10 @@ export default function SparksEditor() {
  setShowForceSave(key.shiftKey && key.ctrlKey);
  };
  + console.log({
  + isSparksValid ,changed:localSparks === tableState?.config.sparks,localSparks,old:tableState?.config.sparks
  + })
  +
  return (
  <>
  <TableHeaderButton
  @@ -143,12 +147,14 @@ export default function SparksEditor() {
  </>
  }
  actions={{
  - primary: {
  - children: showForceSave ? "Force Save" : "Save Changes",
  + primary:showForceSave ? {
  + children: "Force Save",
  + onClick: handleSave,
  +
  + }:{
  + children: "Save Changes",
  onClick: handleSave,
  - disabled:
  - !showForceSave ??
  - (!isSparksValid || localSparks === tableState?.config.sparks),
  + disabled:!isSparksValid || localSparks === tableState?.config.sparks ,
  },
  secondary: {
  children: "Cancel",
  