antd

Ant design table row merge based on data instead of index value

谁都会走 提交于 2020-08-26 05:51:30
问题 { title: 'Home phone', colSpan: 2, dataIndex: 'tel', render: (value, row, index) => { const obj = { children: value, props: {}, }; if (index === 2) { obj.props.rowSpan = 2; } // These two are merged into above cell if (index === 3) { obj.props.rowSpan = 0; } if (index === 4) { obj.props.colSpan = 0; } return obj; }, }, In dis example based on index value rowsspan size is decided, can we do that based on previous column data (if there are two John Brown's then row span should be 2)?. So

regex InputNumber formatter ant-design

余生长醉 提交于 2020-08-25 01:54:26
问题 Guys I really not understand about regex, I'm using ant-design Input Number component to make a currency filter. currently this is like this: <InputNumber style={{ width: 175 }} formatter={value => `R$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ".")} parser={value => value.replace(/[A-Z]|[a-z]|[$ ]|\.+/g, "")} onChange={(value) => setSelectedKeys(value ? value : [])} /> The current format, for exemple thousand five hundred is like this : 1.500 I need it to accept as well, negatives numbers (

Second value overrides previous in reactjs [closed]

给你一囗甜甜゛ 提交于 2020-08-09 13:36:12
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . Improve this question I have the application what count the difference between 2 hours which user sets. Now when i set first hours like: 13:00 and 14:00, i get difference - the diff is 1hours and 0minutes , when i set the second time adding another field, the second field overrides the previous value,

Second value overrides previous in reactjs [closed]

▼魔方 西西 提交于 2020-08-09 13:35:10
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . Improve this question I have the application what count the difference between 2 hours which user sets. Now when i set first hours like: 13:00 and 14:00, i get difference - the diff is 1hours and 0minutes , when i set the second time adding another field, the second field overrides the previous value,

Move expandIcon icon to right and remove empty space from expanded table Ant Design reatc js

心已入冬 提交于 2020-07-21 06:38:57
问题 I need your help to solve this problem. I am using the Ant Design table and I am stuck here. I want the expand row icon should be at the right(Next to delete in the given sandbox code) of table current it is on left and when we expand a row the expanded contents leave a small space in left, I want to remove it. i.e. it should not have any extra space in left. Please help me out, guys. Sandbox code: https://codesandbox.io/s/ancient-mountain-ft8m1?file=/index.js 回答1: A potential solution could