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

Handle the case where there are hidden items in the column. #18385

Merged
merged 1 commit into from Dec 20, 2023

Conversation

maliming
Copy link
Member

@maliming maliming commented Dec 6, 2023

Change modules\identity\src\Volo.Abp.Identity.Web\Pages\Identity\Users\index.js to below to reproduce the problem.

abp.ui.extensions.tableColumns.get('identity.user').addContributor(
    function (columnList) {
        columnList.addManyTail(
            [
                {
                    visible: false,
                    title: l('UserName'),
                    data: 'userName',
                    render: function (data, type, row) {
                        row.userName = $.fn.dataTable.render.text().display(row.userName);
                        if (!row.isActive) {
                            return  '<i data-toggle="tooltip" data-placement="top" title="' +
                                l('ThisUserIsNotActiveMessage') +
                                '" class="fa fa-ban text-danger"></i> ' +
                                '<span class="opc-65">' + row.userName + '</span>';
                        }

                        return row.userName;
                    }
                },
                {
                    title: l('EmailAddress'),
                    data: 'email',
                },
                {
                    visible: false,
                    title: l('PhoneNumber'),
                    data: 'phoneNumber',
                },
                {
                    title: l("Actions"),
                    rowAction: {
                        items: abp.ui.extensions.entityActions.get('identity.user').actions.toArray()
                    }
                }
            ]
        );
    },
    0 //adds as the first contributor
);

@maliming maliming added this to the 8.1-preview milestone Dec 6, 2023
@maliming maliming added the ui-mvc label Dec 6, 2023
@realLiangshiwei realLiangshiwei merged commit 719dd8c into dev Dec 20, 2023
2 checks passed
@realLiangshiwei realLiangshiwei deleted the datatables-extensions.js branch December 20, 2023 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants