Skip to content
Snippets Groups Projects
Commit 5263fb81 authored by Tom Robinson's avatar Tom Robinson
Browse files

Don't show setting reset button on global settings

parent f9d8fcbc
Branches
Tags
No related merge requests found
......@@ -51,6 +51,7 @@ class FormattingWidget extends React.Component {
onChange={settings => onChange({ ...value, [type]: settings })}
column={column}
whitelist={new Set(settings)}
noReset
/>
</div>
))}
......
......@@ -15,6 +15,8 @@ const ChartSettingsWidget = ({
props,
// disables X padding for certain widgets so divider line extends to edge
noPadding,
// disable reset button
noReset,
// NOTE: pass along special props to support:
// * adding additional fields
// * substituting widgets
......@@ -35,7 +37,7 @@ const ChartSettingsWidget = ({
<Icon
size={12}
className={cx("ml1 text-light text-medium-hover cursor-pointer", {
hidden: !set,
hidden: !set || noReset,
})}
name="refresh"
tooltip="Reset to default"
......
......@@ -24,6 +24,7 @@ type Props = {
whitelist?: Set<SettingId>,
blacklist?: Set<SettingId>,
inheritedSettings?: Settings,
noReset?: boolean,
};
const ColumnSettings = ({
......@@ -33,6 +34,7 @@ const ColumnSettings = ({
whitelist,
blacklist,
inheritedSettings = {},
noReset = false,
}: Props) => {
const storedSettings = value || {};
......@@ -74,6 +76,7 @@ const ColumnSettings = ({
hidden={false}
unset={storedSettings[widget.id] === undefined}
noPadding
noReset={noReset || widget.noReset}
/>
))
) : (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment