Skip to content

Commit 0a2376a

Browse files
authored
Merge pull request #236 from yajra/selectKeys
feat: select keyboard navigation and selection
2 parents 4bd6b36 + 8eda6e0 commit 0a2376a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Html/Options/Plugins/Select.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,18 @@ public function selectStyleMultiShift(): static
208208
return $this->select(['style' => Builder::SELECT_STYLE_MULTI_SHIFT]);
209209
}
210210

211+
/**
212+
* Select keyboard navigation and selection.
213+
*
214+
* @return $this
215+
*
216+
* @see https://datatables.net/extensions/select/examples/initialisation/keys
217+
*/
218+
public function selectKeys(bool $enabled = true): static
219+
{
220+
return $this->select(['keys' => $enabled]);
221+
}
222+
211223
public function getSelect(?string $key = null): mixed
212224
{
213225
if (is_null($key)) {

0 commit comments

Comments
 (0)