Comments (10)
This situation was found after ABP upgraded Blazorise to 1.5.0, and since ABP allows dynamic configuration of columns, we encountered duplicate columns.
from blazorise.
@stsrki Not wanting to be that "told you so" person, but I will be:
Please advise since originally you asked for it to be magical, instead of opt in.
#3579
@realLiangshiwei As a workaround you can probably set some dummy invisible column to trick the system into not auto generating.
from blazorise.
I still believe we should do the "magic" and assume that if no columns are defined, they should be autogenerated. In the users provided example, they use the TItem, and later, they manually add columns that are already in the IItem model. Maybe in this scenario, it makes more sense to hide or show columns by using the new ColumnChooser feature?
from blazorise.
Well I have to disagree. Because we want the magic, then the user has to do figure out how to work around it. I'm still of the original belief with the explicit opt in. Or at least able to turn it off.
Anyway, now we went this route, and we need to find sound solutions... :)
Maybe in this scenario, it makes more sense to hide or show columns by using the new ColumnChooser feature?
Can you further explain what this entails?
The ColumnChooser is mainly an end user feature (the user that uses the UI).
Are you suggesting that the programmer will hide them programmatically, or is the end user with the UI?
Let's stay, for example, I have 100 properties in the Item (I'm exagerating of course...), should I have to pay the cost for the 100 columns and then hide them?
from blazorise.
I'm still of the original belief with the explicit opt in. Or at least able to turn it off.
Yes, an option to turn it off would be useful.
from blazorise.
I mean to use ColumnChooser programmatically. But we only have that option in the next 1.6 with #5404. And it is done through the state management. So it is not possible at the moment.
We could introduce an opt-out API, but should we use it in the current 1.5?
@realLiangshiwei, did you try the workaround that David suggested?
from blazorise.
did you try the workaround that David suggested?
This is a workaround, and yes, it works. I just think this code is a bit ugly
from blazorise.
We could introduce an opt-out API, but should we use it in the current 1.5?
Well I would say that this is basically the AutoGenerateColumns initially proposed? Just that it's set to true by default. I don't see why not. It's flexibility without any real cost.
If you told me that adding the Parameter
add any big downside... It seems like we are enforcing the "magic" just because we want to. Well we can enforce it by default, but let the user have something like AutoGenerateColumns
so he can just do AutoGenerateColumns=false
.
As usual I prefer to add it in v1.6 since there's indeed a workaround even though it's not super elegant.
But the change is so simple it wouldn't hurt to do it in v1.5, again, I personally just don't like new apis popping up mid release if not absolutely necessary.
So go ahead and let me know if you finally agree with the Parameter, or if you have any other idea, and what version would you prefer to do this on.
from blazorise.
You have convinced me. Do the change in 1.5, and if it is not too big, once I review, then it will be merged in.
The API will be AutoGenerateColumns
and, by default, is enabled.
from blazorise.
@David-Moreira reminder
from blazorise.
Related Issues (20)
- [Bug]: Crash when checking license if chart is inside a slow carrousel. HOT 5
- [Docs] TreeView: Mention how Nodes is a one way binding
- [Bug]: DataGridSelectColumn shows filter value instead of empty filter cell HOT 4
- [Bug]: DatePicker doesn't show error message HOT 2
- Implement zoom functionality HOT 2
- [Bug]: DatePicker validaton not working for Dates
- [Bug]: The DropDown size cannot be changed with version 1.52 and FluentUI HOT 2
- [Bug]: Stepper is not accessible HOT 2
- [Bug]: missing css class for botstrap5
- ReuseTab
- Datagrid Sorted Group
- [Bug]: Switching between rich text components to fast, causes Microsoft.JSInterop.JSException HOT 5
- [Bug]: Button loading Spinner is very close to text
- [Bug]: BlazorWebAssembly MessageProvider not displaying the confirmation dialog HOT 2
- [Bug]: Closing badges within modal closes the modal
- [Bug]: Renewed license token not woring HOT 6
- [Bug]: ModalProvider updates parameters mutliple times on show and again on hide. HOT 4
- Theme: add an option to define a font-family HOT 1
- [Bug]: 'bi-' prefix removed from Bootstrap css class names in BootstrapIcons.cs
- Allow NumericEdit to work with any numeric value type HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blazorise.