Replace disabled attribute by readonly attribute (#281)

Co-authored-by: Camille Saillard <camille.saillard.prestataire@anct.gouv.fr>
This commit is contained in:
Louis Delbosc 2022-09-16 14:44:39 +02:00 committed by GitHub
parent 494a683332
commit c8a80cb56e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ export function buildNameConfig(owner: MultiHolder, origColumn: ColumnRec, curso
),
cssInput(editableColId,
saveColId,
dom.boolAttr('disabled', use => use(origColumn.disableModify) || !use(origColumn.untieColIdFromLabel)),
dom.boolAttr(`readonly`, use => use(origColumn.disableModify) || !use(origColumn.untieColIdFromLabel)),
cssCodeBlock.cls(''),
{style: 'margin-top: 8px'},
testId('field-col-id'),
@ -396,7 +396,7 @@ const cssInput = styled(textInput, `
color: ${theme.inputPlaceholderFg};
}
&:disabled {
&[readonly] {
background-color: ${theme.inputDisabledBg};
color: ${theme.inputDisabledFg};
}