[Bugfix] remove empty label when build value label in <SelectRow> #317
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
修掉
<SelectRow>
在找不到 value 對應的 label 時,仍會把空的值 join 起來做成 rowValueLabel 導致多了不需要的分隔符號的問題。e.g. value = ['a','b'], labelMap = { a: 'a', }, separator = '/',則 SelectRow 的 valueLabel 應該要是
a
,因為找不到 b 對應的 label。現在會變成
a/
,因為它在 labelMap 找不到對應的 value key 時仍然會把 undefined join 成 valueLabel。Changes
Risk
Usually none, if you have any please write it here.
TODOs