BIT-1658 Change the Linked custom field to display the name (#988)

This commit is contained in:
Oleg Semenenko 2024-02-08 12:35:47 -06:00 committed by Álison Fernandes
parent 03c21a953d
commit c3724605b8

View file

@ -105,6 +105,7 @@ fun VaultAddEditCustomField(
customField.vaultLinkedFieldType?.let { fieldType ->
CustomFieldLinkedField(
selectedOption = fieldType,
label = customField.name,
supportedLinkedTypes = supportedLinkedTypes,
onValueChanged = {
onCustomFieldValueChange(customField.copy(vaultLinkedFieldType = it))
@ -228,11 +229,11 @@ private fun CustomFieldTextField(
*/
@Composable
private fun CustomFieldLinkedField(
label: String,
selectedOption: VaultLinkedFieldType,
onValueChanged: (VaultLinkedFieldType) -> Unit,
onEditValue: () -> Unit,
modifier: Modifier = Modifier,
label: String = stringResource(id = R.string.options),
supportedLinkedTypes: ImmutableList<VaultLinkedFieldType> = persistentListOf(),
) {
val possibleTypesWithStrings = supportedLinkedTypes.associateWith { it.label.invoke() }