Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: HSLdevcom/jore4-ui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 940aca2fa1c0d0cf078d54294531da842ca4c174
Choose a base ref
..
head repository: HSLdevcom/jore4-ui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feed4d2b3529eca32be8936702ee27fb44823673
Choose a head ref
Showing with 3 additions and 3 deletions.
  1. +3 −3 ui/src/components/common/info-container/useInfoContainerControls.ts
Original file line number Diff line number Diff line change
@@ -11,19 +11,19 @@ type InfoContainerControlOptions = {
readonly onCancel: () => void;
};

const defaultOptions: InfoContainerControlOptions = {
const defaultOptions: InfoContainerControlOptions = Object.freeze({
isExpandable: false,
isEditable: false,
expandedByDefault: true,
onSave: noop,
onCancel: noop,
};
});

function getAllOptions(
options: Partial<InfoContainerControlOptions> | undefined,
): InfoContainerControlOptions {
if (options) {
return merge(defaultOptions, options);
return merge({}, defaultOptions, options);
}

return defaultOptions;