This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[terra-form-select] Native Select allow initial values (#3829)
* Update: Native Select allow initial values * Updated change log files * Update: wdio screenshots update * Update: Removed the usage of state varaible * Updated change log file- addressed review comment * Update: Added expect statement in testcase- review comment * WDIO Snapshots Update * Updating useEffect documentation --------- Co-authored-by: Shalini <[email protected]> Co-authored-by: Akshar <[email protected]>
- Loading branch information
1 parent
12c5a23
commit 01fa65c
Showing
23 changed files
with
62 additions
and
3 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
32 changes: 32 additions & 0 deletions
32
...rra-core-docs/src/terra-dev-site/test/form-select/native-select/ControlledSelect.test.jsx
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,32 @@ | ||
import React, { useState } from 'react'; | ||
import classNames from 'classnames/bind'; | ||
import NativeSelect from 'terra-form-select/lib/native-select/NativeSelect'; | ||
import Button from 'terra-button'; | ||
import styles from './NativeSelectTest.module.scss'; | ||
|
||
const cx = classNames.bind(styles); | ||
|
||
const ControlledSelect = () => { | ||
const [value, setValue] = useState(null); | ||
|
||
return ( | ||
<div className={cx('test-shell')}> | ||
<NativeSelect | ||
ariaLabel="Controlled Select Example" | ||
id="test-select-id" | ||
onChange={event => setValue(event.currentTarget.value)} | ||
options={[ | ||
{ value: 'volvo', display: 'Volvo' }, | ||
{ value: 'saab', display: 'Saab' }, | ||
{ value: 'mercedes', display: 'Mercedes' }, | ||
{ value: 'audi', display: 'Audi' }, | ||
]} | ||
value={value} | ||
className={cx('form-select')} | ||
/> | ||
<Button id="test-button-id" text="Set Mercedes" onClick={() => setValue('mercedes')} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ControlledSelect; |
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
Binary file added
BIN
+4.06 KB
...cal-lowlight-theme/en/chrome_tiny/native-select-spec/controlled-select-null.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 added
BIN
+4.44 KB
...al-lowlight-theme/en/chrome_tiny/native-select-spec/controlled-select-value.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
+1 Byte
(100%)
...inical-lowlight-theme/en/chrome_tiny/native-select-spec/long-text-displayed.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 added
BIN
+3.91 KB
...orion-fusion-theme/en/chrome_tiny/native-select-spec/controlled-select-null.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 added
BIN
+4.17 KB
...rion-fusion-theme/en/chrome_tiny/native-select-spec/controlled-select-value.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
-1 Byte
(100%)
...erence/orion-fusion-theme/en/chrome_tiny/native-select-spec/default_display.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
-1 Byte
(100%)
...eference/orion-fusion-theme/en/chrome_tiny/native-select-spec/default_hover.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
+0 Bytes
(100%)
...orion-fusion-theme/en/chrome_tiny/native-select-spec/filter-style-displayed.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
+0 Bytes
(100%)
...nce/orion-fusion-theme/en/chrome_tiny/native-select-spec/filter-style-hover.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
-1 Byte
(100%)
...ence/orion-fusion-theme/en/chrome_tiny/native-select-spec/invalid_displayed.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
+2 Bytes
(100%)
...ce/orion-fusion-theme/en/chrome_tiny/native-select-spec/long-text-displayed.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
+2 Bytes
(100%)
...erence/orion-fusion-theme/en/chrome_tiny/native-select-spec/long-text-hover.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 added
BIN
+4.16 KB
...erra-default-theme/en/chrome_tiny/native-select-spec/controlled-select-null.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 added
BIN
+4.52 KB
...rra-default-theme/en/chrome_tiny/native-select-spec/controlled-select-value.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
+1 Byte
(100%)
...rence/terra-default-theme/en/chrome_tiny/native-select-spec/default_display.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
+1 Byte
(100%)
...ference/terra-default-theme/en/chrome_tiny/native-select-spec/default_hover.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
+0 Bytes
(100%)
.../terra-default-theme/en/chrome_tiny/native-select-spec/incomplete_displayed.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
+0 Bytes
(100%)
...ence/terra-default-theme/en/chrome_tiny/native-select-spec/incomplete_hover.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