mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 16:46:00 +00:00
23 lines
569 B
JavaScript
23 lines
569 B
JavaScript
import React from 'react';
|
|
import styled from 'styled-components';
|
|
|
|
const StyledInput = styled.textarea`
|
|
flex: 1;
|
|
`;
|
|
|
|
export function TextCellViewWrap({ value, grider, selection }) {
|
|
return <StyledInput value={value} wrap="hard" readOnly />;
|
|
}
|
|
|
|
export function TextCellViewNoWrap({ value, grider, selection }) {
|
|
return (
|
|
<StyledInput
|
|
value={value}
|
|
wrap="off"
|
|
readOnly
|
|
// readOnly={grider ? !grider.editable : true}
|
|
// onChange={(e) => grider.setCellValue(selection[0].row, selection[0].column, e.target.value)}
|
|
/>
|
|
);
|
|
}
|