rename params, disable clear btn on RangePickers

This commit is contained in:
Фролов 2021-05-31 10:48:36 +05:00
parent 7cd0971f24
commit 8238bdb523
2 changed files with 5 additions and 4 deletions

View File

@ -8,7 +8,7 @@ const { Option } = Select;
const linesCollection = [ const linesCollection = [
{ label: "Глубина забоя", xAccessorName: "wellDepth", color: '#f00' }, { label: "Глубина забоя", xAccessorName: "wellDepth", color: '#f00' },
{ label: "Положение инструмента", xAccessorName: "bitDepth", color: '#ff0' }, { label: "Положение инструмента", xAccessorName: "bitDepth", color: '#ff0' },
{ label: "Высота талевого блока", xAccessorName: "blockPosition", color: '#f0f' }, { label: "Положение талевого блока", xAccessorName: "blockPosition", color: '#f0f' },
{ label: "Талевый блок. Мин положение", xAccessorName: "blockPositionMin", color: '#0ff' }, { label: "Талевый блок. Мин положение", xAccessorName: "blockPositionMin", color: '#0ff' },
{ label: "Талевый блок. Макс положение", xAccessorName: "blockPositionMax", color: '#0f0' }, { label: "Талевый блок. Макс положение", xAccessorName: "blockPositionMax", color: '#0f0' },
{ label: "Скорость талевого блока", xAccessorName: "blockSpeed", color: '#00f' }, { label: "Скорость талевого блока", xAccessorName: "blockSpeed", color: '#00f' },
@ -54,7 +54,6 @@ const tagRender = ({ label, value, closable, onClose }) =>{
let color = linesCollection.find(l=>l.xAccessorName === value)?.color let color = linesCollection.find(l=>l.xAccessorName === value)?.color
return ( return (
<Tag <Tag
//color={color}
onMouseDown={onPreventMouseDown} onMouseDown={onPreventMouseDown}
closable={closable} closable={closable}
onClose={onClose} onClose={onClose}
@ -85,8 +84,9 @@ export function ArchiveColumn({ data, config, rangeDate, chartRatio, onRemoveCha
const select = <Select const select = <Select
mode="multiple" mode="multiple"
placeholder="Выберите линии" placeholder="Выберите линии"
value={selectedValues} value={selectedValues}
//showArrow allowClear={false}
showArrow
bordered={false} bordered={false}
tagRender={tagRender} tagRender={tagRender}
onChange={handleLinesSetChange} onChange={handleLinesSetChange}

View File

@ -128,6 +128,7 @@ export default function Archive() {
<ConfigProvider locale={locale}> <ConfigProvider locale={locale}>
<RangePicker <RangePicker
showTime showTime
allowClear={false}
onChange = {onChangeRange} onChange = {onChangeRange}
value = {rangeDate} value = {rangeDate}
/> />