Open ZsDeak-SAP opened 1 year ago
@ZsDeak-SAP Hello, I did not understand well what is the problem, Can you please attack stackblitz example?
@khotcholava it's the fd-segmented-button-complex-example from the fundamental examples, only with toggle mode and array value, but here's the same copy pasted to stackblitz😄 :
https://stackblitz.com/edit/tlhuhf?file=src%2Fapp%2Fsegmented-button-complex-example.component.ts
When you use toggle mode, value
accepts an array. In this example I oversimplified handleValueChange
, but it's still valid, it sets an array of values. As you can see the selected value is written under the buttons, but there's no highlight on the selected button.
Is this a bug, enhancement, or feature request?
bug
Briefly describe your proposal.
Which versions of Angular and Fundamental Library for Angular are affected? (If this is a feature request, use current version.)
tried with Angular 15 and fundamental 40.3, but the code is the same on master right now
If this is a bug, please provide steps for reproducing it.
Use the component in toggle mode, starting with empty state. Assign the clicked button's value to the current value in a handler.
Expected: the value defined by the parent component through
writeValue
is presented by the componentActual: the inner handler overrides the button's
toggled
state. what i saw in the code was a call first fromwriteValue
that selected the button, but then the segmented-button component's own event handler deselected it.Please provide relevant source code if applicable.