-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add column layout options in settings #5186
base: limit-ui-improvement-4
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -122,11 +129,25 @@ export function Settings({ state, onStateChanged }: SettingsProps) { | |||
[onStateChanged], | |||
) | |||
|
|||
const handleColumnLayoutSelect = useCallback( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to use useCallback
since React 19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
@@ -124,6 +126,19 @@ export function OrdersTableWidget({ | |||
const ordersPermitStatus = useGetOrdersPermitStatus() | |||
const injectedWidgetParams = useInjectedWidgetParams() | |||
const [searchTerm, setSearchTerm] = useState('') | |||
const limitOrdersSettings = useAtomValue(limitOrdersSettingsAtom) | |||
const columnLayout = useMemo(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const layoutMap: Record<string, ColumnLayout> = {
DEFAULT: ColumnLayout.DEFAULT,
VIEW_2: ColumnLayout.VIEW_2,
VIEW_3: ColumnLayout.VIEW_3,
};
const columnLayout = layoutMap[limitOrdersSettings.columnLayout] || ColumnLayout.DEFAULT;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shoom3301 Addressed this now
Summary