Skip to content

Commit

Permalink
Fixing cssTransitionfalse does not disable animations globally (prime…
Browse files Browse the repository at this point in the history
…faces#7417)

* Fixing cssTransitionfalse does not disable animations globally

* Updating other props in PrimeReactContext.js facing same issue

* Update TemplateLicense.js

---------

Co-authored-by: Melloware <mellowaredev@gmail.com>
  • Loading branch information
tneeraja95 and melloware authored Nov 14, 2024
1 parent d8e8c17 commit e7dc619
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
32 changes: 16 additions & 16 deletions components/lib/api/PrimeReactContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ import PrimeReact from './PrimeReact';
export const PrimeReactContext = React.createContext();

export const PrimeReactProvider = (props) => {
const propsValue = props.value || {};
const propsValue = props.value ?? {};

const [ripple, setRipple] = useState(propsValue.ripple || false);
const [inputStyle, setInputStyle] = useState(propsValue.inputStyle || 'outlined');
const [locale, setLocale] = useState(propsValue.locale || 'en');
const [appendTo, setAppendTo] = useState(propsValue.appendTo || null);
const [styleContainer, setStyleContainer] = useState(propsValue.styleContainer || null);
const [cssTransition, setCssTransition] = useState(propsValue.cssTransition || true);
const [autoZIndex, setAutoZIndex] = useState(propsValue.autoZIndex || true);
const [hideOverlaysOnDocumentScrolling, setHideOverlaysOnDocumentScrolling] = useState(propsValue.hideOverlaysOnDocumentScrolling || false);
const [nonce, setNonce] = useState(propsValue.nonce || null);
const [nullSortOrder, setNullSortOrder] = useState(propsValue.nullSortOrder || 1);
const [ripple, setRipple] = useState(propsValue.ripple ?? false);
const [inputStyle, setInputStyle] = useState(propsValue.inputStyle ?? 'outlined');
const [locale, setLocale] = useState(propsValue.locale ?? 'en');
const [appendTo, setAppendTo] = useState(propsValue.appendTo ?? null);
const [styleContainer, setStyleContainer] = useState(propsValue.styleContainer ?? null);
const [cssTransition, setCssTransition] = useState(propsValue.cssTransition ?? true);
const [autoZIndex, setAutoZIndex] = useState(propsValue.autoZIndex ?? true);
const [hideOverlaysOnDocumentScrolling, setHideOverlaysOnDocumentScrolling] = useState(propsValue.hideOverlaysOnDocumentScrolling ?? false);
const [nonce, setNonce] = useState(propsValue.nonce ?? null);
const [nullSortOrder, setNullSortOrder] = useState(propsValue.nullSortOrder ?? 1);
const [zIndex, setZIndex] = useState(
propsValue.zIndex || {
propsValue.zIndex ?? {
modal: 1100,
overlay: 1000,
menu: 1000,
Expand All @@ -27,15 +27,15 @@ export const PrimeReactProvider = (props) => {
}
);
const [ptOptions, setPtOptions] = useState(
propsValue.ptOptions || {
propsValue.ptOptions ?? {
mergeSections: true,
mergeProps: true
}
);
const [pt, setPt] = useState(propsValue.pt || undefined);
const [unstyled, setUnstyled] = useState(propsValue.unstyled || false);
const [pt, setPt] = useState(propsValue.pt ?? undefined);
const [unstyled, setUnstyled] = useState(propsValue.unstyled ?? false);
const [filterMatchModeOptions, setFilterMatchModeOptions] = useState(
propsValue.filterMatchModeOptions || {
propsValue.filterMatchModeOptions ?? {
text: [FilterMatchMode.STARTS_WITH, FilterMatchMode.CONTAINS, FilterMatchMode.NOT_CONTAINS, FilterMatchMode.ENDS_WITH, FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS],
numeric: [FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS, FilterMatchMode.LESS_THAN, FilterMatchMode.LESS_THAN_OR_EQUAL_TO, FilterMatchMode.GREATER_THAN, FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],
date: [FilterMatchMode.DATE_IS, FilterMatchMode.DATE_IS_NOT, FilterMatchMode.DATE_BEFORE, FilterMatchMode.DATE_AFTER]
Expand Down
1 change: 0 additions & 1 deletion components/templates/TemplateLicense.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

const TemplateLicense = ({ license }) => {
return (
<div className="template-license-wrapper">
Expand Down

0 comments on commit e7dc619

Please sign in to comment.