Skip to content

Commit 67da1f5

Browse files
committed
Merge remote-tracking branch 'origin/main' into benelan/ccr-vite-fix
* origin/main: chore: release next fix(input-time-zone): prevent items from being deselected (#7661)
2 parents 05ab848 + 4b4c43c commit 67da1f5

File tree

7 files changed

+35
-15
lines changed

7 files changed

+35
-15
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/calcite-components-react/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.7.1-next.2](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-09-05)
7+
8+
**Note:** Version bump only for package @esri/calcite-components-react
9+
610
## [1.7.1-next.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-09-02)
711

812
**Note:** Version bump only for package @esri/calcite-components-react

packages/calcite-components-react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@esri/calcite-components-react",
33
"sideEffects": false,
4-
"version": "1.7.1-next.1",
4+
"version": "1.7.1-next.2",
55
"homepage": "https://developers.arcgis.com/calcite-design-system/",
66
"description": "A set of React components that wrap calcite components",
77
"license": "SEE LICENSE.md",
@@ -20,7 +20,7 @@
2020
"dist/"
2121
],
2222
"dependencies": {
23-
"@esri/calcite-components": "^1.7.1-next.1"
23+
"@esri/calcite-components": "^1.7.1-next.2"
2424
},
2525
"peerDependencies": {
2626
"react": ">=16.7",

packages/calcite-components/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.7.1-next.2](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-09-05)
7+
8+
### Bug Fixes
9+
10+
- **input-time-zone:** prevent items from being deselected ([#7661](https://github.com/Esri/calcite-design-system/issues/7661)) ([c2dd436](https://github.com/Esri/calcite-design-system/commit/c2dd4368c2707dcfdfeafb85d80e2f48706e0354)), closes [#7530](https://github.com/Esri/calcite-design-system/issues/7530)
11+
612
## [1.7.1-next.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-09-02)
713

814
### Bug Fixes

packages/calcite-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@esri/calcite-components",
3-
"version": "1.7.1-next.1",
3+
"version": "1.7.1-next.2",
44
"homepage": "https://developers.arcgis.com/calcite-design-system/",
55
"description": "Web Components for Esri's Calcite Design System.",
66
"main": "dist/index.cjs.js",

packages/calcite-components/src/components/input-time-zone/input-time-zone.e2e.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,21 @@ describe("calcite-input-time-zone", () => {
103103

104104
expect(await timeZoneItem.getProperty("textLabel")).toMatch("GMT-6");
105105
});
106+
107+
it("does not allow users to deselect a timezone offset", async () => {
108+
const page = await newE2EPage();
109+
await page.emulateTimezone("America/Los_Angeles");
110+
await page.setContent(html`<calcite-input-time-zone value="-360" open></calcite-input-time-zone>`);
111+
await page.waitForChanges();
112+
113+
let selectedTimeZoneItem = await page.find("calcite-input-time-zone >>> calcite-combobox-item[selected]");
114+
await selectedTimeZoneItem.click();
115+
await page.waitForChanges();
116+
117+
selectedTimeZoneItem = await page.find("calcite-input-time-zone >>> calcite-combobox-item[selected]");
118+
const input = await page.find("calcite-input-time-zone");
119+
120+
expect(await input.getProperty("value")).toBe("-360");
121+
expect(await selectedTimeZoneItem.getProperty("textLabel")).toMatch("GMT-6");
122+
});
106123
});

packages/calcite-components/src/components/input-time-zone/input-time-zone.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,6 @@ export class InputTimeZone
138138
*/
139139
@Prop({ mutable: true }) value: string;
140140

141-
@Watch("value")
142-
valueWatcher(value: string): void {
143-
if (this.comboboxEl && this.comboboxEl.value !== value) {
144-
this.comboboxEl.value = value;
145-
}
146-
}
147-
148141
//--------------------------------------------------------------------------
149142
//
150143
// Public Methods
@@ -316,7 +309,7 @@ export class InputTimeZone
316309
open={this.open}
317310
overlayPositioning={this.overlayPositioning}
318311
scale={this.scale}
319-
selectionMode="single"
312+
selectionMode="single-persist"
320313
// eslint-disable-next-line react/jsx-sort-props -- ref should be last so node attrs/props are in sync (see https://github.com/Esri/calcite-design-system/pull/6530)
321314
ref={this.setComboboxRef}
322315
>

0 commit comments

Comments
 (0)