mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
refactor(FE): Hide delete button if only one item remains in table
This commit is contained in:
@@ -49,17 +49,19 @@ const SalesOrderProductTable = ({
|
|||||||
>
|
>
|
||||||
<Icon icon='heroicons:pencil' width={20} height={20} />
|
<Icon icon='heroicons:pencil' width={20} height={20} />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
{data.length > 1 && (
|
||||||
type='button'
|
<Button
|
||||||
variant='ghost'
|
type='button'
|
||||||
color='none'
|
variant='ghost'
|
||||||
onClick={() => {
|
color='none'
|
||||||
onDeleteRef.current(item.id as number);
|
onClick={() => {
|
||||||
}}
|
onDeleteRef.current(item.id as number);
|
||||||
className='p-0 text-error hover:text-base-content'
|
}}
|
||||||
>
|
className='p-0 text-error hover:text-base-content'
|
||||||
<Icon icon='heroicons:trash' width={20} height={20} />
|
>
|
||||||
</Button>
|
<Icon icon='heroicons:trash' width={20} height={20} />
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user