-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
263 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-react': patch | ||
--- | ||
|
||
Fixed an issue where nested `Popover`s were automatically closing due to faulty "outside click" detection. |
Binary file modified
BIN
+143 Bytes
(100%)
...react-workshop/cypress-visual-screenshots/baseline/DatePicker.test.ts-Basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+160 Bytes
(100%)
...t-workshop/cypress-visual-screenshots/baseline/DatePicker.test.ts-Localized.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+166 Bytes
(100%)
...p/cypress-visual-screenshots/baseline/DatePicker.test.ts-With Combined Time.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+97 Bytes
(100%)
...t-workshop/cypress-visual-screenshots/baseline/DatePicker.test.ts-With Time.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+124 Bytes
(100%)
...t-workshop/cypress-visual-screenshots/baseline/DatePicker.test.ts-With Year.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+269 Bytes
(100%)
...ct-workshop/cypress-visual-screenshots/baseline/Table.test.ts-Custom Filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+74 Bytes
(100%)
apps/react-workshop/cypress-visual-screenshots/baseline/Table.test.ts-Filters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+25.7 KB
(700%)
apps/react-workshop/cypress-visual-screenshots/baseline/Table.test.ts-Full2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+14 Bytes
(100%)
.../react-workshop/cypress-visual-screenshots/baseline/Table.test.ts-Localized.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,69 @@ | ||
import { Popover } from '@itwin/itwinui-react'; | ||
import * as React from 'react'; | ||
import { ComboBox, Popover } from '@itwin/itwinui-react'; | ||
import { useSearchParams } from '@remix-run/react'; | ||
|
||
export default function Page() { | ||
const [searchParams] = useSearchParams(); | ||
|
||
if (searchParams.get('nestedComboBox')) { | ||
return <NestedComboBoxTest />; | ||
} | ||
|
||
return <FocusTest />; | ||
} | ||
|
||
// ---------------------------------------------------------------------------- | ||
|
||
function NestedComboBoxTest() { | ||
return ( | ||
<Popover | ||
applyBackground | ||
content={ | ||
<div> | ||
<h2>Popover title</h2> | ||
<ComboBox | ||
options={React.useMemo( | ||
() => [ | ||
{ label: 'Item 1', value: 1 }, | ||
{ label: 'Item 2', value: 2 }, | ||
{ label: 'Item 3', value: 3 }, | ||
], | ||
[], | ||
)} | ||
/> | ||
</div> | ||
} | ||
> | ||
<button>Open</button> | ||
</Popover> | ||
); | ||
} | ||
|
||
// ---------------------------------------------------------------------------- | ||
|
||
function FocusTest() { | ||
const [searchParams] = useSearchParams(); | ||
|
||
const shouldImperativeFocus = searchParams.get('imperativeFocus') === 'true'; | ||
const shouldFocusInput = searchParams.get('focusInput') === 'true'; | ||
|
||
return ( | ||
<> | ||
<Popover | ||
applyBackground | ||
content={ | ||
<div> | ||
<h2 | ||
tabIndex={-1} | ||
ref={shouldImperativeFocus ? (el) => el?.focus() : undefined} | ||
> | ||
Popover title | ||
</h2> | ||
<p>Popover content</p> | ||
{shouldFocusInput && <input />} | ||
</div> | ||
} | ||
> | ||
<button>Open</button> | ||
</Popover> | ||
</> | ||
<Popover | ||
applyBackground | ||
content={ | ||
<div> | ||
<h2 | ||
tabIndex={-1} | ||
ref={shouldImperativeFocus ? (el) => el?.focus() : undefined} | ||
> | ||
Popover title | ||
</h2> | ||
<p>Popover content</p> | ||
{shouldFocusInput && <input />} | ||
</div> | ||
} | ||
> | ||
<button>Open</button> | ||
</Popover> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.