Skip to content

Commit b837913

Browse files
committed
fix: add stateChangedCallback() to dashboard lwcs
1 parent 75b651c commit b837913

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

packages/plugin-templates/test/commands/force/lightning/component/create.test.ts

+8
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ describe('Lightning component creation tests:', () => {
245245
assert.fileContent(jsFile, '@api getState;');
246246
assert.fileContent(jsFile, '@api setState;');
247247
assert.fileContent(jsFile, '@api refresh;');
248+
assert.fileContent(
249+
jsFile,
250+
'@api stateChangedCallback(prevState, newState)'
251+
);
248252
}
249253
);
250254
test
@@ -293,6 +297,10 @@ describe('Lightning component creation tests:', () => {
293297
assert.fileContent(jsFile, '@api selection;');
294298
assert.fileContent(jsFile, '@api setSelection;');
295299
assert.fileContent(jsFile, '@api selectMode;');
300+
assert.fileContent(
301+
jsFile,
302+
'@api stateChangedCallback(prevState, newState)'
303+
);
296304
}
297305
);
298306
});

packages/templates/src/templates/lightningcomponent/lwc/analyticsDashboard/analyticsDashboard.js

+2
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ export default class <%= className %> extends LightningElement {
44
@api getState;
55
@api setState;
66
@api refresh;
7+
8+
@api stateChangedCallback(prevState, newState) {}
79
}

packages/templates/src/templates/lightningcomponent/lwc/analyticsDashboardWithStep/analyticsDashboardWithStep.js

+2
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ export default class <%= className %> extends LightningElement {
99
@api getState;
1010
@api setState;
1111
@api refresh;
12+
13+
@api stateChangedCallback(prevState, newState) {}
1214
}

0 commit comments

Comments
 (0)