Giter Club home page Giter Club logo

Comments (5)

wakuflair avatar wakuflair commented on June 17, 2024

Hi @zHaytam

Thank you for using my module:)

Since ABP setting values can be empty, I think it's better to allow user to pass an empty content from the frontend.

For default values, I'm thinking adding a "Reset to default" button to each group. What's your opinion?

from abp.settingui.

gdlcf88 avatar gdlcf88 commented on June 17, 2024

Hi @wakuflair

I think "Reset to default" is a good idea, maybe "Reset" is a better name for the button, because if you delete a setting value, it will inherit from the upstream (ABP calls it "fallback", see: hikalkan's comment)

And please also add "Inherited" or "Fallback" label to the settings which have no customized value.

from abp.settingui.

gdlcf88 avatar gdlcf88 commented on June 17, 2024

If a user deletes the content of a setting, it will be saved as blank in the DB. This overrides the default value with "nothing".

I have a setting item with none-value by default:

image

When I use the SettingUI to change another item, the none-value item's value ("") is committed and I can see an extra row in the database:

image

Unchanged setting items may not need to be committed. What do you think? @wakuflair

from abp.settingui.

wakuflair avatar wakuflair commented on June 17, 2024

@gdlcf88
AFAIK, If you provide a default value to your setting, and later you set exactly the default value to it, ABP will delete the record from the setting table.

from abp.settingui.

gdlcf88 avatar gdlcf88 commented on June 17, 2024

Maybe "Save" buttons for each setting item is a good way to avoid all these problems.

from abp.settingui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.