-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UIEUS-307: empty values for selectboxes (#389)
* UIEUS-307-empty-values-for-selectboxes * UIEUS-307-empty-values-for-selectboxes change to null * UIEUS-307-empty-values-for-selectboxes increase interface version * Move empty entry to extractHarvesterImpls function Set undefined on empty strings in onChange functions Change null values to undefined Co-authored-by: elsenhans <[email protected]> Co-authored-by: alb3rtino <[email protected]>
- Loading branch information
1 parent
cef9dd4
commit 20eb315
Showing
5 changed files
with
9 additions
and
5 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
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,4 +1,5 @@ | ||
export default [ | ||
{ value: undefined, label: '' }, | ||
{ value: 'aggregator', label: 'Aggregator' }, | ||
{ value: 'sushi', label: 'Sushi' } | ||
]; |
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,4 +1,5 @@ | ||
export default [ | ||
{ value: undefined, label: '' }, | ||
{ value: 4, label: 'Counter 4' }, | ||
{ value: 5, label: 'Counter 5' }, | ||
]; |
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,12 +1,14 @@ | ||
const extractHarvesterImpls = (resources) => { | ||
const records = (resources.harvesterImpls || {}).records || []; | ||
const records = resources.harvesterImpls?.records || []; | ||
const implementations = records.length | ||
? records[0].implementations | ||
: []; | ||
return implementations.map(i => ({ | ||
const results = implementations.map(i => ({ | ||
value: i.type, | ||
label: i.name | ||
})); | ||
results.unshift({ value: undefined, label: '' }); | ||
return results; | ||
}; | ||
|
||
export default extractHarvesterImpls; |