mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 00:09:40 +02:00
refactor(kube/volumes): migrate to react [EE-4695] (#10987)
This commit is contained in:
parent
2b53bebcb3
commit
da615afc92
24 changed files with 347 additions and 397 deletions
|
@ -1,3 +1,6 @@
|
|||
import _ from 'lodash';
|
||||
import { useState } from 'react';
|
||||
|
||||
interface Props {
|
||||
value: number;
|
||||
onChange(value: number): void;
|
||||
|
@ -5,10 +8,17 @@ interface Props {
|
|||
}
|
||||
|
||||
export function ItemsPerPageSelector({ value, onChange, showAll }: Props) {
|
||||
const [id] = useState(() => `${_.uniqueId()}-items-per-page`);
|
||||
return (
|
||||
<span className="limitSelector">
|
||||
<span className="space-right">Items per page</span>
|
||||
<label
|
||||
className="space-right text-xs text-[--text-main-color] font-normal"
|
||||
htmlFor={id}
|
||||
>
|
||||
Items per page
|
||||
</label>
|
||||
<select
|
||||
id={id}
|
||||
className="form-control"
|
||||
value={value}
|
||||
onChange={(e) => onChange(Number(e.target.value))}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue