MCPcopy Index your code
hub / github.com/plotly/dash / isFirstLevelPropsChild

Function isFirstLevelPropsChild

dash/dash-renderer/src/wrapper/selectors.ts:23–43  ·  view source on GitHub ↗
(
    updatedPath: string,
    strPath: string
)

Source from the content-addressed store, hash-verified

21const previousHashes: Hashes = {};
22
23const isFirstLevelPropsChild = (
24 updatedPath: string,
25 strPath: string
26): [boolean, string[]] => {
27 const updatedSegments = updatedPath.split(',');
28 const fullSegments = strPath.split(',');
29
30 // Check that strPath actually starts with updatedPath
31 const startsWithPath = fullSegments.every(
32 (seg, i) => updatedSegments[i] === seg
33 );
34
35 if (!startsWithPath) return [false, []];
36
37 // Get the remaining path after the prefix
38 const remainingSegments = updatedSegments.slice(fullSegments.length);
39
40 const propsCount = remainingSegments.filter(s => s === 'props').length;
41
42 return [propsCount < 2, remainingSegments];
43};
44
45function determineChangedProps(
46 state: any,

Callers 1

determineChangedPropsFunction · 0.85

Calls 1

filterMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…