Comments (5)
I feel like you wouldn't want to mix/match specifying the width at the column level AND with the GridTemplateColumns
. I feel like it should be one OR the other. If we assume that, then we could provide logic that would throw an error if they tried to specify it in both places. Thoughts?
from fast-blazor.
Sorry... I haven't been very clear in what I was thinking with regards to the design around this. I'm not suggesting that we remove the GridTemplateColumns
parameter. My suggestion is that we either:
- Use the user supplied
GridTemplateColumns
parameter and pass it to the underlying web component. - OR dynamically generate a
GridTemplateColumns
parameter based on the individual values supplied by each column (or use a default ofauto
for any columns that do not have it specified) and pass that down to the web component.
Some pseudo code of the logic (I apologize for any incorrect syntax or spelling errors... just typing it out here):
if(!string.IsNullOrWhitespace(grid.GridTemplateColumns) && grid.Columns.Any(x => !string.IsNullOrWhitespace(x.Width))
{
throw new Exception("You can only specify either the 'GridTemplateColumns' property on the grid, or the 'Width' property at the column level, not both.");
}
var gridTemplateColumnsToPassToWebComponent = grid.GridTemplateColumns;
if(string.IsNullOrWhitespace(gridTemplateColumnsToPassToComponent) && grid.Columns.Any(x => !string.IsNullOrWhitespace(x.Width))
{
gridTemplateColumnsToPassToWebComponent = string.Join(" ", grid.Columns.Select(x => x.Width ?? "auto"));
}
// Pass the `gridTemplateColumnsToPassToWebComponent` down to the web component
...
Hopefully that makes sense. Doing it this way would not introduce a breaking change. Thoughts?
from fast-blazor.
This would be possible, but would conflict with the existing GridTemplateColumns
property.
For example, how to handle a mix of Width
properties with values already specified for GridTemplateColumns
.
I think it would be more appropriate to consider this change in a future major update.
We need to think about a solution that doesn't involve Breaking Change.
from fast-blazor.
With the current rendering method (using the web components) we always need the GridTemplateColumn parameter.
That is why removing it would be a breaking change
from fast-blazor.
Yep. That could be a solution
from fast-blazor.
Related Issues (20)
- fix: FluentEditForm fields are non editable when wrapped in FluentTab and using version 4.7.2 HOT 5
- feat: add ability to turn off SelectAll button in SelectColumn Multiple mode HOT 2
- fix: initial ActiveIndicator in FluentTabs HOT 2
- fix: Double click needed for expanding/collapsing child elements in FluentNavGroup when prerendering is turned off HOT 2
- feat: add support for BackgroundColor & Color in FluentAnchor HOT 1
- fix: bind-SelectedOption is null when using bind-SelectedOption:after FluentComboBox
- feat: add support for Virtualize for FluentCombobox HOT 7
- docs: fix/add Toast / Custom component example / Razor code HOT 2
- Add CultureInfo.InvariantCulture to ToString("0.00") HOT 1
- fix: clicking ColumnOptions in FluentDataGrid throws exception HOT 2
- docs: Make Aside (In this article) scrollable HOT 1
- docs: add documentation on how to provide more parameters to custom dialogs HOT 5
- feat: add OnKeyUp in FluentKeyCode HOT 1
- docs: add some guidance to configure RTL mode HOT 3
- feat: add multi-column to/in combobox HOT 2
- feat: add [required] to [Label] HOT 3
- Maximum call stack size exceeded when using FluentDesignSystemProvider and a FluentCard HOT 2
- feat: [DataGrid] Deselect all other items when row is clicked (not checkbox) HOT 4
- FluentCheckbox issue HOT 1
- Tree component HOT 2
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 fast-blazor.