adding keywords (WIP)

pull/5042/head
lianahus 4 months ago committed by Aniket
parent d5edb137ad
commit 4c5a39d842
  1. 14
      libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx

@ -35,13 +35,23 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => {
const [expand, setExpand] = useState(false) const [expand, setExpand] = useState(false)
const [pinned, setPinned] = useState<boolean>(props.pinned) const [pinned, setPinned] = useState<boolean>(props.pinned)
useEffect(() => { /*setAnyEnabled(
setAnyEnabled(
( (
props.title.toLowerCase().includes(filterCon.filter.toLowerCase()) || props.title.toLowerCase().includes(filterCon.filter.toLowerCase()) ||
props.searchKeywords?.map((keyword) => keyword.toLowerCase()).join(' ').includes(filterCon.filter.toLowerCase()) || props.searchKeywords?.map((keyword) => keyword.toLowerCase()).join(' ').includes(filterCon.filter.toLowerCase()) ||
props.tagList?.join(' ').includes(filterCon.filter.toLowerCase()) props.tagList?.join(' ').includes(filterCon.filter.toLowerCase())
)) ))
*/
useEffect(() => {
// if tags are not used
if (!props.tagList || props.tagList.length == 0) setAnyEnabled(true)
// if at least one tag is matching or "no tag" is checked
else if (props.tagList) setAnyEnabled(props.tagList.some((key) => filterCon.keyValueMap[key]?.enabled) || filterCon?.keyValueMap['no tag']?.enabled)
if (filterCon.filter != '') setAnyEnabled(
anyEnabled && (
props.title.toLowerCase().includes(filterCon.filter.toLowerCase()) ||
props.searchKeywords?.some(searchKeyword => filterCon.filter.includes(searchKeyword))))
}, [filterCon, props.tagList]) }, [filterCon, props.tagList])
/*const listenOnExpand = (key) => { /*const listenOnExpand = (key) => {

Loading…
Cancel
Save