aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common
diff options
context:
space:
mode:
authorMatjaž Črnko <m.crnko@txt.si>2024-01-22 21:06:27 +0100
committerMatjaž Črnko <m.crnko@txt.si>2024-01-22 21:06:27 +0100
commitba24d834925f3d66d875ae601e80a60cf03110cc (patch)
tree54b665435cd2bff9d21d730f7f7c18dbe509da3b /modern/src/common
parent829fa6caac936cc53395ca4fe7f05e13c2841588 (diff)
downloadtrackermap-web-ba24d834925f3d66d875ae601e80a60cf03110cc.tar.gz
trackermap-web-ba24d834925f3d66d875ae601e80a60cf03110cc.tar.bz2
trackermap-web-ba24d834925f3d66d875ae601e80a60cf03110cc.zip
fix: SelectField default to null value and fix emptyTitle
Diffstat (limited to 'modern/src/common')
-rw-r--r--modern/src/common/components/SelectField.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/common/components/SelectField.jsx b/modern/src/common/components/SelectField.jsx
index 3d25ca8e..52ec591b 100644
--- a/modern/src/common/components/SelectField.jsx
+++ b/modern/src/common/components/SelectField.jsx
@@ -8,9 +8,9 @@ const SelectField = ({
label,
fullWidth,
multiple,
- value,
+ value = null,
emptyValue = null,
- emptyTitle = '\u00a0',
+ emptyTitle = '',
onChange,
endpoint,
data,
@@ -23,7 +23,7 @@ const SelectField = ({
if (typeof option !== 'object') {
option = items.find(obj => keyGetter(obj) === option);
}
- return option ? titleGetter(option) : '';
+ return option ? titleGetter(option) : emptyTitle;
}
useEffectAsync(async () => {