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

More options for the Nav widget (and similar ones) #66

Open
Faryshta opened this issue Jul 16, 2015 · 5 comments
Open

More options for the Nav widget (and similar ones) #66

Faryshta opened this issue Jul 16, 2015 · 5 comments

Comments

@Faryshta
Copy link

I focus on the Nav widget for being the more used, other widgets that can benefit from this are Carousel, Tabs, etc.

Currently Nav::$items is an array of items, I propose to have Nav::$itemConfig which will contain a default configuration for each item or several properties like Nav::$itemOptions, Nav::$linkOptions, Nav::$labelOptions etc.

@samdark
Copy link
Member

samdark commented Jul 16, 2015

What's the use case for these?

@Faryshta
Copy link
Author

For example I need all my links on the nav to contain a CSS class.

Its exactly the same use case for ActiveForm::fieldConfig property.

@samdark
Copy link
Member

samdark commented Jul 17, 2015

It's not really a good thing to have a class on each link. Much better to use cascade as .nav a.

@Faryshta
Copy link
Author

@samdark i understand, thats just an example. Besides as I said ActiveForm::fieldConfig do exists for the same reason.

@samdark
Copy link
Member

samdark commented Jul 17, 2015

@Faryshta fieldConfig has a valid use cases. For example, I can add a closure there that adds placeholder attribute to each input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants