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(emeisOptions): action button label overrides #515

Merged

Conversation

derrabauke
Copy link
Contributor

This MR refactors the emeisOptions and therefor lifts the model keys to the root of the config for better overview of the configuration.

Further it introduces action button overrides which are available like this:

//config
user: {
  actions: {
    delete: {
      label: "Override Label",
      fn: (model) => model.id === 0,
    }
  }
}

If you only want to override the function as before, you can use delete: (model) => model.id === 0 directly as before.

@derrabauke derrabauke requested a review from czosel June 28, 2022 15:37
@derrabauke derrabauke force-pushed the feat-emeis-config-label-overrides branch from beca9f3 to 44805c8 Compare June 28, 2022 15:41
@czosel czosel force-pushed the feat-emeis-config-label-overrides branch from c879d90 to e318c6c Compare June 29, 2022 14:23
@czosel czosel merged commit 3d1bfce into projectcaluma:main Jun 29, 2022
github-actions bot pushed a commit that referenced this pull request Jul 4, 2022
# [6.0.0](v5.1.0...v6.0.0) (2022-07-04)

### Bug Fixes

* adapt table hover style ([#465](#465)) ([c3338b5](c3338b5))
* allow to clear parent scope selection ([#464](#464)) ([b24dd06](b24dd06))
* handle case where engine is mounted under different name ([#476](#476)) ([533b3de](533b3de))
* tree search expansion ([#501](#501)) ([5eb804c](5eb804c))

### Features

* **emeisOptions:** action button label overrides ([#515](#515)) ([3d1bfce](3d1bfce))
* **emeisOptions:** add custom column option ([#516](#516)) ([1d88b42](1d88b42))
* **emeisOptions:** make "delete" and "deactivate" buttons visibility configurable ([#462](#462)) ([afc7ca4](afc7ca4))
* mark optional fields ([#507](#507)) ([51debd0](51debd0))
* **tree:** expand root only if its single ([#460](#460)) ([1ca9783](1ca9783))
* **users:** add 'isActive' filter radio buttons ([#510](#510)) ([67e6401](67e6401))

### BREAKING CHANGES

* **emeisOptions:** the emeis options object got restructured

* feat(emeisOptions): enable action button label overrides

* feat: accept functions as label overrides

to allow different labels for active/inactive models

* fix: remove incorrect `fn` lookup, minor refactoring

Co-authored-by: Christian Zosel <[email protected]>
@czosel
Copy link
Contributor

czosel commented Jul 4, 2022

🎉 This PR is included in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

2 participants