Skip to content
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

ListItem doesn't support isEnabled state. #5453

Closed
jodator opened this issue May 10, 2018 · 2 comments · Fixed by ckeditor/ckeditor5-ui#390
Closed

ListItem doesn't support isEnabled state. #5453

jodator opened this issue May 10, 2018 · 2 comments · Fixed by ckeditor/ckeditor5-ui#390
Assignees
Labels
package:ui type:improvement This issue reports a possible enhancement of an existing feature.
Milestone

Comments

@jodator
Copy link
Contributor

jodator commented May 10, 2018

The ListItem used in dropdowns doesn't support enabling/disabling it.

I think that one could set some list items as disabled especially if one is creating dropdown with multiple commands as items:

const command = editor.commands.get( commandName );

const itemModel = new Model( {
	commandName,
	label
} );

itemModel.bind( 'isEnabled' ).to( command );

dropdownItems.add( itemModel );


addListToDropdown( dropdownView, dropdownItems );

Setting isEnabled to false should gray-out the item.

@jodator jodator self-assigned this May 10, 2018
@oleq
Copy link
Member

oleq commented May 29, 2018

I guess this issue is required by https://github.com/ckeditor/ckeditor5-table/issues/1?

@jodator
Copy link
Contributor Author

jodator commented May 29, 2018

Yes.

oleq referenced this issue in ckeditor/ckeditor5-ui Jun 5, 2018
Other: Disabling a `ListItemView` should be possible using the `isEnabled` property. Closes #389.
oleq referenced this issue in ckeditor/ckeditor5-theme-lark Jun 5, 2018
Other: Introduced disabled styles of a list item (see ckeditor/ckeditor5-ui#389).
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-ui Oct 9, 2019
@mlewand mlewand added this to the iteration 18 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:improvement This issue reports a possible enhancement of an existing feature. package:ui labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ui type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants