doing some more mobile views to load more

This commit is contained in:
csawatzky 2025-05-26 13:21:42 -06:00
parent 3368a9112f
commit fde0eb731c
8 changed files with 68 additions and 37 deletions

View file

@ -127,6 +127,7 @@ export default function GateFlowGraph(props: Props) {
setRuntime(moment.duration(runtime));
let state = false;
if (
data.length > 1 &&
data[data.length - 1].value > gate.lowerFlow() &&
data[data.length - 1].value < gate.upperFlow()
) {

View file

@ -12,6 +12,7 @@ import AddGateFab from "./AddGateFab";
import GateSettings from "./GateSettings";
import { useGateAPI, useGlobalState } from "providers";
import { Settings } from "@mui/icons-material";
import { cloneDeep } from "lodash";
interface Props {
//gates: Gate[];
@ -219,6 +220,19 @@ export default function GateList(props: Props) {
onRowClick={(gate) => {goToGate(gate)}}
hideKeys={isMobile || props.useMobile}
setSearchText={(search) => setSearch(search)}
loadMore={()=>{
let current = cloneDeep(gates)
let keys = undefined
let types = undefined
if(currentTerminal) {
keys = [currentTerminal]
types = ["terminal"]
}
gateAPI.listGates(pageSize, current.length , "asc", "name", search, undefined, keys, types, undefined, undefined, as).then(resp => {
let newGates = resp.data.gates.map(gate => Gate.create(gate))
setGates(current.concat(newGates))
})
}}
/>
)
};