AsyncSegment: Display no-options placeholder for no items status (#70995)

AsyncSegment: Display no options dropdown placeholder for no items status
This commit is contained in:
Ivan Ortega Alba 2023-07-06 15:27:11 +02:00 committed by GitHub
parent 4818568c65
commit ad5a36e7a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 '';
}