Skip to content

Conversation

@Ciki
Copy link
Contributor

@Ciki Ciki commented Feb 11, 2019

  • new feature
  • BC break? no

this is useful eg. for controls manually rendered as table cells <td> which have only <tr> valid parent .. if there are multiple cells within table row toggling via id is not feasible (it would toggle all the cells in that row).

Example

$form->addCheckbox('send', 'Ship to address')
	->addCondition($form::FILLED)
		->toggle('body .sendBox');

this is useful eg. for controls manually rendered as table cells `<td>` which have only `<tr>` valid parent .. if there are multiple cells within table row toggling via `id` is not feasible (it would toggle all the cells in that row).
@Ciki Ciki changed the title js: support for toggling by css class, not only id netteForms.js: support for toggling by css class, not only id Feb 11, 2019
@dg
Copy link
Member

dg commented Feb 11, 2019

Thanks

@dg dg merged commit 8e01765 into nette:master Feb 11, 2019
dg pushed a commit that referenced this pull request Feb 11, 2019
this is useful eg. for controls manually rendered as table cells `<td>` which have only `<tr>` valid parent .. if there are multiple cells within table row toggling via `id` is not feasible (it would toggle all the cells in that row).
@dg
Copy link
Member

dg commented Feb 11, 2019

I changed it to full CSS selector.

dg pushed a commit that referenced this pull request Feb 11, 2019
this is useful eg. for controls manually rendered as table cells `<td>` which have only `<tr>` valid parent .. if there are multiple cells within table row toggling via `id` is not feasible (it would toggle all the cells in that row).
dg pushed a commit that referenced this pull request Feb 11, 2019
this is useful eg. for controls manually rendered as table cells `<td>` which have only `<tr>` valid parent .. if there are multiple cells within table row toggling via `id` is not feasible (it would toggle all the cells in that row).
dg pushed a commit that referenced this pull request Feb 19, 2019
this is useful eg. for controls manually rendered as table cells `<td>` which have only `<tr>` valid parent .. if there are multiple cells within table row toggling via `id` is not feasible (it would toggle all the cells in that row).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants