fixing filters layout for no pin button

pull/4817/head
lianahus 6 months ago
parent 3e66dd8710
commit 6da11f8b38
  1. 6
      libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.css
  2. 6
      libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx

@ -38,6 +38,12 @@
top: 0.1rem; top: 0.1rem;
} }
.remixui_grid_cell_tags_no_pin {
position: relative;
right: 0rem;
top: 0.1rem;
}
.remixui_grid_cell_tag { .remixui_grid_cell_tag {
font-size: x-small; font-size: x-small;
font-weight: bolder; font-weight: bolder;

@ -35,6 +35,8 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => {
if (props.tagList) setAnyEnabled(props.tagList.some((key) => filterCon.keyValueMap[key]?.enabled)) if (props.tagList) setAnyEnabled(props.tagList.some((key) => filterCon.keyValueMap[key]?.enabled))
else setAnyEnabled(filterCon?.keyValueMap['no tag']?.enabled) else setAnyEnabled(filterCon?.keyValueMap['no tag']?.enabled)
if (filterCon.filter != '') setAnyEnabled(anyEnabled && props.title.toLowerCase().includes(filterCon.filter)) if (filterCon.filter != '') setAnyEnabled(anyEnabled && props.title.toLowerCase().includes(filterCon.filter))
console.log("pin ", pinned)
}, [filterCon, props.tagList]) }, [filterCon, props.tagList])
/*const listenOnExpand = (key) => { /*const listenOnExpand = (key) => {
@ -65,7 +67,7 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => {
{ props.logo && <img className='remixui_grid_view_logo mr-1' src={props.logo} style={{ width: '1rem', height: '1rem' }}/> } { props.logo && <img className='remixui_grid_view_logo mr-1' src={props.logo} style={{ width: '1rem', height: '1rem' }}/> }
{ props.title && <label { props.title && <label
className='m-0 p-0 align-items-left' className='m-0 p-0 align-items-left'
style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', fontSize: 'xx-small' }} style={{overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', fontSize: 'xx-small'}}
> >
{ props.title } { props.title }
</label> } </label> }
@ -80,7 +82,7 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => {
props.pinStateCallback() props.pinStateCallback()
}} }}
></button>} ></button>}
{ props.tagList && <div className='d-flex flex-column align-items-begin remixui_grid_cell_tags'> { props.tagList && <div className={`d-flex flex-column align-items-begin ` +`${filterCon.showPin ? 'remixui_grid_cell_tags' : 'remixui_grid_cell_tags_no_pin'}`}>
{ Object.keys(props.tagList).map((key) => ( { Object.keys(props.tagList).map((key) => (
filterCon.keyValueMap[props.tagList[key]].enabled && ( filterCon.keyValueMap[props.tagList[key]].enabled && (
<CustomTooltip <CustomTooltip

Loading…
Cancel
Save