[v10.0.x] AsyncSegment: Display no-options placeholder for no items status (#71127)
AsyncSegment: Display no-options placeholder for no items status (#70995)
AsyncSegment: Display no options dropdown placeholder for no items status
(cherry picked from commit ad5a36e7a3)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
This commit is contained in:
co-authored by
Ivan Ortega Alba
parent
be34911395
commit
a5aa8a3c70
@@ -110,9 +110,5 @@ function mapStateToNoOptionsMessage<T>(state: AsyncState<Array<SelectableValue<T
|
||||
return t('grafana-ui.segment-async.error', 'Failed to load options');
|
||||
}
|
||||
|
||||
if (!Array.isArray(state.value) || state.value.length === 0) {
|
||||
return t('grafana-ui.segment-async.no-options', 'No options found');
|
||||
}
|
||||
|
||||
return '';
|
||||
return t('grafana-ui.segment-async.no-options', 'No options found');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user