sad-indigoS
Refine2y ago
3 replies
sad-indigo

Distinct Table

How can I setup my table to only show the first occurrence of a record, e.g. distinct value?

<Table.Column dataIndex="Client" title="Client" 
                filterDropdown={({ setSelectedKeys, selectedKeys, confirm, clearFilters }) => (
                    <div style={{ padding: 8 }}>
                    <Input
                        placeholder={`Search Client`}
                        value={selectedKeys[0]}
                        onChange={e => setSelectedKeys(e.target.value ? [e.target.value] : [])}
                        onPressEnter={() => confirm()}
                        style={{ width: 188, marginBottom: 8, display: 'block' }}/>
                    <Button
                        type="primary"
                        onClick={() => confirm()}
                        size="small"
                        style={{ width: 90, marginRight: 8 }}
                    >
                        Search
                    </Button>
                    <Button onClick={() => clearFilters()} size="small" style={{ width: 90 }}>Reset</Button>
                    </div>
                )}
              />
Was this page helpful?