Global InputNumber parameter #165
-
Hi, is it possible to set useGrouping: false for all INputNumber components globally? |
Beta Was this translation helpful? Give feedback.
Answered by
melloware
Oct 4, 2023
Replies: 1 comment 7 replies
-
Just wrap the component into your own component with that value defaulted. For example here is where I wrap the Dialog component in my own component but set some defaults. import { LazyLog } from "@melloware/react-logviewer";
import { Dialog, DialogProps } from "primereact/dialog";
import { ObjectUtils } from "primereact/utils";
import React, { useState } from "react";
const JobLogViewerDialog = (props: DialogProps) => {
// local state
const [log, setLog] = useState<string | undefined>(undefined);
return (
<Dialog maximizable maximized style={{ width: "100vw", height: "75vh" }} {...props}>
<LazyLog text={log} selectableLines caseInsensitive enableSearch enableSearchNavigation enableHotKeys extraLines={1} />
</Dialog>
);
};
export default React.memo(JobLogViewerDialog); so then I can use it anywhere in my code like... <JobLogViewerDialog header={header} visible={visibleLogViewer} onHide={() => setVisibleLogViewer(false)} /> |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reported here and marking as answer: primefaces/primereact#5023