Skip to content

Commit 4abae07

Browse files
authored
Set min actions column width (#590)
1 parent e958968 commit 4abae07

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/table/useColumns/useRowActions.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { useMemo } from "react"
22
import Flex from "@/components/templates/flex"
3-
43
import Action from "../components/action"
54

65
export const supportedRowActions = {
@@ -43,6 +42,8 @@ export const supportedRowActions = {
4342
},
4443
}
4544

45+
const MIN_ACTIONS_COLUMN_WIDTH = 70
46+
4647
export default (rowActions, { testPrefix, tableMeta } = {}) => {
4748
const availableRowActions = useMemo(
4849
() =>
@@ -114,7 +115,7 @@ export default (rowActions, { testPrefix, tableMeta } = {}) => {
114115
enableColumnFilter: false,
115116
enableSorting: false,
116117
tableMeta,
117-
size: availableRowActions.length * 35 < 40 ? 40 : availableRowActions.length * 35,
118+
size: Math.max(MIN_ACTIONS_COLUMN_WIDTH, availableRowActions.length * 35),
118119
align: "end",
119120
notFlex: true,
120121
meta: {

0 commit comments

Comments
 (0)