MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / isFormFieldOverridden

Function isFormFieldOverridden

frontend/src/utils/forms/ChannelUtils.js:102–109  ·  view source on GitHub ↗
(channel, field, formValue)

Source from the content-addressed store, hash-verified

100// persisted check keeps the reset control available when an override's
101// value coincides with the provider value.
102export const isFormFieldOverridden = (channel, field, formValue) => {
103 if (!channel?.auto_created) return false;
104 const persisted = channel.override?.[field];
105 if (persisted !== null && persisted !== undefined) return true;
106 const normalizedForm = normalizeFieldValue(field, formValue);
107 const normalizedProvider = normalizeFieldValue(field, channel[field]);
108 return normalizedForm !== normalizedProvider;
109};
110
111// Human labels for the table's overrides indicator tooltip.
112export const listOverriddenFields = (channel) => {

Callers 3

ProviderHintRowFunction · 0.90
ChannelFormFunction · 0.90

Calls 1

normalizeFieldValueFunction · 0.85

Tested by

no test coverage detected