kopia lustrzana https://github.com/bugout-dev/moonstream
Fix card select.
rodzic
e519cabad9
commit
69c3072905
|
@ -179,8 +179,18 @@ const EntriesNavigation = () => {
|
||||||
|
|
||||||
const handleFilterStateCallback = (props) => {
|
const handleFilterStateCallback = (props) => {
|
||||||
console.log("handleFilterStateCallback", props);
|
console.log("handleFilterStateCallback", props);
|
||||||
const newFilterState = [...filterState];
|
const oldFilterState = [...filterState];
|
||||||
newFilterState.push({ ...props });
|
oldFilterState.push({ ...props });
|
||||||
|
|
||||||
|
const newFilterState = oldFilterState;
|
||||||
|
ui.setSearchTerm(
|
||||||
|
newFilterState
|
||||||
|
.map((filter) => {
|
||||||
|
return filter.direction + ":" + filter.value;
|
||||||
|
})
|
||||||
|
.join("+")
|
||||||
|
);
|
||||||
|
|
||||||
setFilterState(newFilterState);
|
setFilterState(newFilterState);
|
||||||
};
|
};
|
||||||
if (subscriptionsCache.isLoading) return "";
|
if (subscriptionsCache.isLoading) return "";
|
||||||
|
@ -268,33 +278,15 @@ const EntriesNavigation = () => {
|
||||||
</Select>
|
</Select>
|
||||||
)}
|
)}
|
||||||
{filter.direction === DIRECTIONS.DESTINATION && (
|
{filter.direction === DIRECTIONS.DESTINATION && (
|
||||||
<Select
|
<Input
|
||||||
variant="solid"
|
type="text"
|
||||||
colorScheme="primary"
|
onChange={(e) =>
|
||||||
name="address"
|
setFilterProps(idx, {
|
||||||
onChange={handleAddressChange(idx)}
|
value: e.target.value,
|
||||||
>
|
})
|
||||||
{!subscriptionsCache.isLoading &&
|
}
|
||||||
subscriptionsCache.data.subscriptions.map(
|
placeholder="Type in address"
|
||||||
(subscription, idx) => {
|
/>
|
||||||
return (
|
|
||||||
<option
|
|
||||||
value={subscription.address}
|
|
||||||
key={`subscription-filter-item-${idx}`}
|
|
||||||
>
|
|
||||||
{`${
|
|
||||||
subscription.label
|
|
||||||
} - ${subscription.address.slice(
|
|
||||||
0,
|
|
||||||
5
|
|
||||||
)}...${subscription.address.slice(
|
|
||||||
-3
|
|
||||||
)}`}
|
|
||||||
</option>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
</Select>
|
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
Ładowanie…
Reference in New Issue