Comments (8)
Great idea, I have it in my roadmap, will try to implement it in a week. I will keep you updated
from ka-table.
Hi @C0casio45 search bar has been added in v11.0.0
Demo: https://komarovalexander.github.io/ka-table/#/header-filter-logic
![image](https://private-user-images.githubusercontent.com/17903747/341572532-df2aef01-c17b-4376-bfac-c192c5a78390.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2MTQyOTEsIm5iZiI6MTcyMTYxMzk5MSwicGF0aCI6Ii8xNzkwMzc0Ny8zNDE1NzI1MzItZGYyYWVmMDEtYzE3Yi00Mzc2LWJmYWMtYzE5MmM1YTc4MzkwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIyVDAyMDYzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE5MDIwYmIxZDIyMjNhYmYyMWNhMDIwZTNlM2I4NjAzNzNjM2MzMjQ5YWYxNDM0ZTlhY2UxNGMzMTlmMjFmZjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0rd_5e8DROcKMg4jWpmMIKiVoFs4JaPtF6yL6njVYhs)
from ka-table.
Hey, thanks a lot
I have some questions
First in your example, the only filterable score is 33, is it supposed to work like this ?
Also, there is a way to cutomize the key passed to the underneath table ? (or getting a random one)
from ka-table.
First in your example, the only filterable score is 33, is it supposed to work like this ?
sorry did not get the question
Also, there is a way to cutomize the key passed to the underneath table ? (or getting a random one)
what purpose?
from ka-table.
First in your example, the only filterable score is 33, is it supposed to work like this ?
My bad for this one I didn't get that 33 was already typed ...
Also, there is a way to cutomize the key passed to the underneath table ? (or getting a random one)
I am passing an object to it and getting this error
Warning: Encountered two children with the same key, `[object Object]`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
at Rows (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:3704:35)
at VirtualizedRows (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:3819:24)
at TableBodyContent (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:3882:35)
at tbody
at TableBody (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:3952:35)
at table
at div
at TableWrapper (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:5056:22)
at div
at TableControlled (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:5153:35)
at TableUncontrolled (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:5260:21)
at Table (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:913:28)
at HeaderFilterPopupContent (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:1596:26)
at div
at div
at HeaderFilterPopup (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:1766:26)
at div
at TableControlled (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:5153:35)
at TableUncontrolled (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:5260:21)
at Table (http://localhost:3000/node_modules/.vite/deps/chunk-MVUGCKE5.js?v=526fafc0:913:28)
I also mentionned that large playload of headers are not rendered with virtualization, is it intendeed ?
from ka-table.
Can you share the link to example with the error on stackblitz https://stackblitz.com/edit/table-header-filter-logic-ts?file=Demo.tsx ?
from ka-table.
I have no access to satckblitz here, it's blocked by the company policies...
This is my column
{
key: "componentSoftwareVersions",
title: "Software Versions",
dataType: DataType.Object,
visible: true,
headerFilterListItems: softwareVersionsFilterListItems,
filter: (value, filterValue) =>
filterValue?.some((x: any) =>
value.some(((v: any) => v.id === x.id))),
isHeaderFilterSearchable: true,
headerFilterSearch: (value, searchValue) =>
value.softwareVersion.software.name.toLowerCase().includes(searchValue.toLowerCase())
},
This is the case in the format property of the Table
case "componentSoftwareVersions":
return value?.map((v: any) => v.softwareVersion.software.name + " " + v.softwareVersion.version).join(", ") ?? "∅";
This is part of the childComponent property of the Table
headerFilterPopupTextCell: {
content: ({ value }) => {
if(value.employee) return value.employee.fullName
if(value.softwareVersion) return value.softwareVersion.software.name + " " + value.softwareVersion.version
return value.name
}
}
This is an example of the object itself
{
id: "AAA-123",
componentSoftwareVersions: [
{id: "6977"
softwareVersion: {
id: "2"
software: {
name: "React"
}
version: "18.3.1"}},
{id: "6978"
softwareVersion: {
id: "1"
software: {
name: "Vitejs"
}
version: "5.3.0"}},
]
}
I also checked that all my componentSoftwareVersions.id
from ka-table.
headerFilterListItems
is a function which should return array of strings.
Check demo https://komarovalexander.github.io/ka-table/#/header-filter-logic
And docs: https://ka-table.com/docs_props.html#toc1
from ka-table.
Related Issues (20)
- Actual filtered data HOT 1
- sort prop in ka-table not supporting server-side sorting HOT 3
- Reordering group of colomns HOT 2
- Problem with virtual scrolling, many columns and not so many data HOT 2
- Jest deprecations on mock functions produced with jest.fn() HOT 1
- are async validations possible? HOT 2
- Add previous state in onDispatch action HOT 10
- Unable to select all the cell content with mouse double click in firefox HOT 4
- Dynamically calculate page number of a row when grouping is implemented HOT 2
- Feature Request: When virtualScroll is enabled, have Summary row always be visible HOT 1
- $ka-filter-row-cell-padding not set to default HOT 1
- Typo and missing default flags in static/themes/default.scss HOT 2
- Focusing/scroll issues when virtualization is enabled HOT 4
- add isFilterActive
- Display both up and down arrows for non sorted column HOT 2
- Alternate row background in virtualize mode HOT 2
- Data not showing while using useEffect with state HOT 3
- Cannot change pageIndex through useState HOT 4
- Apply cell auto width with max with
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ka-table.