-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Block: headers toggle don't work #8
Comments
@gbdesign2023 This is more like a missing feature. The headers toggle was more of an experimental for your issue and was added only to the field itself (that's why it works on the drawer and not the preview), also the headers would still appear on your page even if I'd say right now it's more of an experimental feature as I could not find a nice way to integrate this and I'm not satisfied with it. Here's my current approach: We're talking about rendering of the table inside the page, my idea was to alter the // get the field blueprint
$blueprint = $field->parent()->blueprint()->field($field->key());
// return the headers field value
$hasHeaders = $blueprint['headers'] ?? true;
// return the first row if true or an empty array if false
$headers = $hasHeaders ? array_shift($rows) : []; This translates into the following:
And the current problems are:
At this point, I don't know exactly what would even be the best approach to this feature or if I'm looking at it the right way. Some thoughts regarding this matter would be appreciated. |
Perhaps I have created an unnecessary complication... |
This feature is still welcomed but would stay as 'experimental' for now until I can find a good balance on how it works. @gbdesign2023 Would be nice to share your progress on how you've been able to fix your issue after the last update and some panel shots/video on how are you currently using it. It would help me to better understand it's purpose. :) |
I have found a small, cosmetic problem:
With the setting "headers: false" in the blueprint, the first line is still displayed as a header in the inline editor. In the dialog editor, the display is correct.
The text was updated successfully, but these errors were encountered: