fix title and search

pull/5042/head
yann300 4 months ago committed by Aniket
parent bfbd9096f1
commit c195a8c194
  1. 3
      apps/remix-ide/src/app/providers/environment-explorer.tsx
  2. 13
      libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx

@ -107,7 +107,6 @@ export class EnvironmentExplorer extends ViewPlugin {
plugin={this}
title={provider.displayName}
logos={provider.logos}
hideTitle={true}
classList='EECellStyle'
searchKeywords={['Injected', provider.name, provider.displayName, provider.title, provider.description]}
pinned={this.pinnedProviders.includes(provider.name)}
@ -143,7 +142,6 @@ export class EnvironmentExplorer extends ViewPlugin {
title={provider.displayName}
logos={provider.logos}
classList='EECellStyle'
hideTitle={true}
searchKeywords={['Remix VMs', provider.name, provider.displayName, provider.title, provider.description]}
pinned={this.pinnedProviders.includes(provider.name)}
id={provider.name}
@ -177,7 +175,6 @@ export class EnvironmentExplorer extends ViewPlugin {
title={provider.displayName}
logos={provider.logos}
classList='EECellStyle'
hideTitle={true}
searchKeywords={['Externals', provider.name, provider.displayName, provider.title, provider.description]}
pinned={this.pinnedProviders.includes(provider.name)}
id={provider.name}

@ -35,14 +35,13 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => {
const [expand, setExpand] = useState(false)
const [pinned, setPinned] = useState<boolean>(props.pinned)
useEffect(() => {
//if (!props.plugin.isActive) return
if (props.tagList) setAnyEnabled(props.tagList.some((key) => filterCon.keyValueMap[key]?.enabled))
else setAnyEnabled(filterCon?.keyValueMap['no tag']?.enabled)
if (!props.tagList || props.tagList.length == 0) setAnyEnabled(true)
useEffect(() => {
setAnyEnabled(
anyEnabled && (props.title?.toLowerCase().includes(filterCon.filter?.toLowerCase()) || props.searchKeywords?.map(keyword => keyword.toLowerCase()).some(searchKeyword => searchKeyword.toLowerCase().includes(filterCon.filter))))
(
props.title.toLowerCase().includes(filterCon.filter.toLowerCase()) ||
props.searchKeywords?.map((keyword) => keyword.toLowerCase()).join(' ').includes(filterCon.filter.toLowerCase()) ||
props.tagList?.join(' ').includes(filterCon.filter.toLowerCase())
))
}, [filterCon, props.tagList])
/*const listenOnExpand = (key) => {

Loading…
Cancel
Save