From 41de2effca5fbac86d6afc8229425c568b520179 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Tue, 14 May 2019 09:08:59 +0200 Subject: [PATCH] chore: use new material-ui instead of d2-ui-core for TextField (#316) d2-ui-core TextField uses old material-ui so replace it with direct use of new material-ui. This will again be replaced when ui-core textarea is published --- src/components/Item/TextItem/Item.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Item/TextItem/Item.js b/src/components/Item/TextItem/Item.js index 7b3b8bf50..60f5bb1e6 100644 --- a/src/components/Item/TextItem/Item.js +++ b/src/components/Item/TextItem/Item.js @@ -1,7 +1,7 @@ import React, { Fragment } from 'react'; import { connect } from 'react-redux'; import i18n from '@dhis2/d2-i18n'; -import TextField from '@dhis2/d2-ui-core/text-field/TextField'; +import Input from '@material-ui/core/Input'; import { Parser as RichTextParser, Editor as RichTextEditor, @@ -25,6 +25,7 @@ const style = { width: '90%', margin: '0 auto', display: 'block', + lineHeight: '24px', }, container: { marginBottom: '20px', @@ -35,10 +36,10 @@ const style = { const TextItem = props => { const { item, editMode, text, acUpdateDashboardItem } = props; - const onChangeText = text => { + const onChangeText = event => { const updatedItem = { ...item, - text, + text: event.target.value, }; acUpdateDashboardItem(updatedItem); @@ -60,10 +61,9 @@ const TextItem = props => {
-