Skip to content

[Tab] Can I use data-action and data-param with tabs? #5975

@3amprogrammer

Description

@3amprogrammer

Currently I have something like this:

$tabs.tab({
    auto: true,
    path: '/partner/cleaners/{id}/',
    apiSettings: {
        urlData: {
            id: dto.page.cleaner.id
        }
    }
});

where each tab has the final part (data-tab) of the url, that in the end is something like: /partners/cleaners/123/calendar.

I would like to be able to do this:

<div class="ui pointing secondary menu">
    <a class="item" data-action="get calendar" data-id="123">Kalendarz</a>
    <!--- or something like this -->
    <a class="item" data-tab="get calendar" data-id="123">Kalendarz</a>
    <!-- or even this -->
    <a class="item" data-tab="tabIdSoWeKnowWhereToPutContent" data-action="get calendar" data-id="123">Kalendarz</a>
</div>

I think this is more flexible and readable. Of course get calendar would be defined according to Api Module docs. Can I do this? I have already went through the docs/issues but I didn't find the solution.

Would this be welcomed if I do the PR?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions