Skip to content
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

Rename merge and useMergeProps options with mergeSections and mergeProps options on usePassThrough method #4342

Closed
mertsincan opened this issue Aug 28, 2023 · 0 comments
Assignees
Labels
Type: Breaking Change Issue contains a breaking change related to a specific component
Milestone

Comments

@mertsincan
Copy link
Member

mertsincan commented Aug 28, 2023

This change was made to make it easier for users to understand what the options are used for.

Options Description
mergeSections Used to merge PT sections of a component. Default value is true.
mergeProps Whether to use Vue's mergeProps method to merge PT options. Default value is false. Ref: https://vuejs.org/api/render-function.html#mergeprops

Examples

  • { mergeSections: true, mergeProps: false }
const Custom_Tailwind = usePassThrough(
    Tailwind,
    {
        panel: {
            header: 'my_panel_header'
        }
    },
    { mergeSections: true, mergeProps: false }
);

Output: 
panel.header.class => 'my_panel_header'
panel.title.class => Tailwind.panel.title.class
  • { mergeSections: true, mergeProps: true }
const Custom_Tailwind = usePassThrough(
    Tailwind,
    {
        panel: {
            header: 'my_panel_header'
        }
    },
    { mergeSections: true, mergeProps: true }
);

Output: 
panel.header.class => [Tailwind.panel.header.class, 'my_panel_header']
panel.title.class => Tailwind.panel.title.class
  • { mergeSections: false, mergeProps: true }
const Custom_Tailwind = usePassThrough(
    Tailwind,
    {
        panel: {
            header: 'my_panel_header'
        }
    },
    { mergeSections: false, mergeProps: true }
);

Output: 
panel.header.class => [Tailwind.panel.header.class, 'my_panel_header']
panel.title.class => undefined
  • { mergeSections: false, mergeProps: false }
const Custom_Tailwind = usePassThrough(
    Tailwind,
    {
        panel: {
            header: 'my_panel_header'
        }
    },
    { mergeSections: false, mergeProps: false }
);

Output: 
panel.header.class => 'my_panel_header'
panel.title.class => undefined
@mertsincan mertsincan added the Type: Breaking Change Issue contains a breaking change related to a specific component label Aug 28, 2023
@mertsincan mertsincan added this to the 3.32.3 milestone Aug 28, 2023
@mertsincan mertsincan self-assigned this Aug 28, 2023
@mertsincan mertsincan changed the title Rename merge and useMergeProps options with mergeSections and mergeProps options on usePassThrough method Rename merge and useMergeProps options with mergeSections and mergeProps options on usePassThrough method Aug 28, 2023
@mertsincan mertsincan changed the title Rename merge and useMergeProps options with mergeSections and mergeProps options on usePassThrough method Rename merge and useMergeProps options with mergeSections and mergeProps options on usePassThrough method Aug 28, 2023
tugcekucukoglu added a commit that referenced this issue Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Breaking Change Issue contains a breaking change related to a specific component
Projects
None yet
Development

No branches or pull requests

1 participant