Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Text field wrapping in index #5917

Closed
schonhoff opened this issue Sep 28, 2023 · 0 comments
Closed

Text field wrapping in index #5917

schonhoff opened this issue Sep 28, 2023 · 0 comments
Labels
pending Issues that are pending triage

Comments

@schonhoff
Copy link

schonhoff commented Sep 28, 2023

  • Laravel Version: 10.24.0
  • Nova Version: 4.27.13
  • PHP Version: 8.2.10
  • Database Driver & Version: MySQL 8.0.30
  • Operating System and Version: Windows 11
  • Browser type and version: Chrome 117

Description:

Hello,

I tried out the following on a large text field:
#5525

But it won't work:
image

This is the field definition:

Text::make(__('Name'), 'name')
	->sortable()
	->rules('required', 'max:255')
	->displayUsing(function ($name) {
		return __($name);
	})
	->withMeta(['wrapping' => true]),

Detailed steps to reproduce the issue on a fresh Nova installation:

The reason why it isn't working is the class in the span for the field. Maybe it should be like the ResourceTableRow.vue with 'whitespace-nowrap': !field.wrapping? The field should be visible in the vue component.

In js/fields/Index/TextField.vue:

<span
   v-else-if="fieldValue && !field.copyable && !shouldDisplayAsHtml"
   class="whitespace-nowrap"
>
   {{ fieldValue }}
</span>

I saw the same class="whitespace-nowrap" in the following components:

  • DateField.vue
  • DateTimeField
  • LineField
  • SelectField
  • StackField
  • TextField
  • UrlField

It shouldn't change anything because the default value for wrapping is "false". If more information is needed, I will try to provide it asap. Thanks for the great tool!

@crynobone crynobone added the pending Issues that are pending triage label Sep 29, 2023
@laravel laravel locked and limited conversation to collaborators Nov 28, 2023
@davidhemphill davidhemphill converted this issue into discussion #6073 Nov 28, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
pending Issues that are pending triage
Projects
None yet
Development

No branches or pull requests

2 participants