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

feat(Tabs): add content prop to avoid the render of the HTML markup #1831

Merged
merged 6 commits into from
Jun 4, 2024

Conversation

emavitta
Copy link

@emavitta emavitta commented Jun 2, 2024

πŸ”— Linked issue

Resolves #1709

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This prop give tha ability to the user to remove the render markup of the content completely. It may be useful in certain cases, where the user is using the @change event, because is changing something else, and using the tab just as a switcher component.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@emavitta emavitta changed the title Feat/tabs: add contentless prop to avoid the render of the HTML markup feat/tabs: add contentless prop to avoid the render of the HTML markup Jun 3, 2024
@@ -32,7 +32,7 @@
</HTab>
</HTabList>

<HTabPanels :class="ui.container">
<HTabPanels v-if="!$props.contentless" :class="ui.container">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<HTabPanels v-if="!$props.contentless" :class="ui.container">
<HTabPanels v-if="!contentless" :class="ui.container">

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah sorry my fault. Fixing right now.

@benjamincanac benjamincanac changed the title feat/tabs: add contentless prop to avoid the render of the HTML markup feat(Tabs): add contentless prop to avoid the render of the HTML markup Jun 3, 2024
@benjamincanac
Copy link
Member

I'm wondering if it wouldn't be better to name the prop content (defaults to true) to be used as :content="false". That is what I was planning to do in v3.

@emavitta
Copy link
Author

emavitta commented Jun 3, 2024

I'm wondering if it wouldn't be better to name the prop content (defaults to true) to be used as :content="false". That is what I was planning to do in v3.

That actually makes a lot of sense. I started with the less suffix cause it was an addendum, so more of a feature on top of the default behaviour, but makes sense. Should i change it or you prefer leave it as is until v3?

Copy link
Member

No you can do it like this in your PR, it will avoid another breaking change πŸ˜…

@benjamincanac benjamincanac changed the title feat(Tabs): add contentless prop to avoid the render of the HTML markup feat(Tabs): add content prop to avoid the render of the HTML markup Jun 3, 2024
@benjamincanac benjamincanac merged commit 6e2678d into nuxt:dev Jun 4, 2024
2 checks passed
@benjamincanac
Copy link
Member

Thanks! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tabs] Disable content prop
2 participants